… | |
… | |
24 | =cut |
24 | =cut |
25 | |
25 | |
26 | package Convert::Scalar; |
26 | package Convert::Scalar; |
27 | |
27 | |
28 | BEGIN { |
28 | BEGIN { |
29 | $VERSION = 0.1; |
29 | $VERSION = '1.04'; |
30 | @ISA = qw(Exporter); |
30 | @ISA = qw(Exporter); |
31 | @EXPORT_OK = qw(weaken unmagic grow); |
31 | @EXPORT_OK = qw(weaken unmagic grow); |
32 | %EXPORT_TAGS = ( |
32 | %EXPORT_TAGS = ( |
33 | taint => [qw(taint untaint tainted)], |
33 | taint => [qw(taint untaint tainted)], |
34 | utf8 => [qw(utf8 utf8_on utf8_off utf8_valid utf8_upgrade utf8_downgrade utf8_encode utf8_decode utf8_length)], |
34 | utf8 => [qw(utf8 utf8_on utf8_off utf8_valid utf8_upgrade utf8_downgrade utf8_encode utf8_decode utf8_length)], |
… | |
… | |
94 | |
94 | |
95 | Returns the number of characters in the string, counting wide UTF8 |
95 | Returns the number of characters in the string, counting wide UTF8 |
96 | characters as a single character, independent of wether the scalar is |
96 | characters as a single character, independent of wether the scalar is |
97 | marked as containing bytes or mulitbyte characters. |
97 | marked as containing bytes or mulitbyte characters. |
98 | |
98 | |
99 | =item unmagic scalar |
99 | =item unmagic scalar, type |
100 | |
100 | |
101 | Removes magic from the scalar. |
101 | Remove the specified magic from the scalar (DANGEROUS!). |
102 | |
102 | |
103 | =item weaken scalar |
103 | =item weaken scalar |
104 | |
104 | |
105 | Weaken a reference. (See also L<WeakRef>). |
105 | Weaken a reference. (See also L<WeakRef>). |
106 | |
106 | |
… | |
… | |
110 | |
110 | |
111 | =item tainted scalar |
111 | =item tainted scalar |
112 | |
112 | |
113 | returns true when the scalar is tainted, false otherwise. |
113 | returns true when the scalar is tainted, false otherwise. |
114 | |
114 | |
115 | =item untaint scalar, type |
115 | =item untaint scalar |
116 | |
116 | |
117 | Remove the specified magic from the scalar |
117 | Remove the tainted flag from the specified scalar. |
118 | (DANGEROUS!), L<perlguts>. L<Untaint>, for a similar but different |
|
|
119 | interface. |
|
|
120 | |
118 | |
121 | =item grow scalar, newlen |
119 | =item grow scalar, newlen |
122 | |
120 | |
123 | Sets the memory area used for the scalar to the given length, if the |
121 | Sets the memory area used for the scalar to the given length, if the |
124 | current length is less than the new value. This does not affect the |
122 | current length is less than the new value. This does not affect the |
… | |
… | |
141 | instead if you understand what this function is fore. Better yet: don't |
139 | instead if you understand what this function is fore. Better yet: don't |
142 | use this module in this case. |
140 | use this module in this case. |
143 | |
141 | |
144 | =item refcnt_rv scalar[, newrefcnt] |
142 | =item refcnt_rv scalar[, newrefcnt] |
145 | |
143 | |
146 | Works like C<refcnt>, but dereferences the given reference first. Remember |
144 | Works like C<refcnt>, but dereferences the given reference first. This is |
147 | that taking a reference of some object increases it's reference count, so |
145 | useful to find the reference count of arrays or hashes, which cnanot be |
148 | the reference count used by the C<*_rv>-funtions tend to be one higher. |
146 | passed directly. Remember that taking a reference of some object increases |
|
|
147 | it's reference count, so the reference count used by the C<*_rv>-functions |
|
|
148 | tend to be one higher. |
149 | |
149 | |
150 | =item refcnt_inc_rv scalar |
150 | =item refcnt_inc_rv scalar |
151 | |
151 | |
152 | Works like C<refcnt_inc>, but dereferences the given reference first. |
152 | Works like C<refcnt_inc>, but dereferences the given reference first. |
153 | |
153 | |
… | |
… | |
186 | sv_pvutf8n_force |
186 | sv_pvutf8n_force |
187 | the sv2xx family |
187 | the sv2xx family |
188 | |
188 | |
189 | =head1 AUTHOR |
189 | =head1 AUTHOR |
190 | |
190 | |
191 | Marc Lehmann <pcg@goof.com> |
191 | Marc Lehmann <schmorp@schmorp.de> |
192 | http://www.goof.com/pcg/marc/ |
192 | http://home.schmorp.de/ |
193 | |
193 | |
194 | =cut |
194 | =cut |
195 | |
195 | |