… | |
… | |
15 | The following export tags exist: |
15 | The following export tags exist: |
16 | |
16 | |
17 | :utf8 all functions with utf8 in their name |
17 | :utf8 all functions with utf8 in their name |
18 | :taint all functions with taint in their name |
18 | :taint all functions with taint in their name |
19 | :refcnt all functions with refcnt in their name |
19 | :refcnt all functions with refcnt in their name |
|
|
20 | :ok all *ok-functions. |
20 | |
21 | |
21 | =over 4 |
22 | =over 4 |
22 | |
23 | |
23 | =cut |
24 | =cut |
24 | |
25 | |
25 | package Convert::Scalar; |
26 | package Convert::Scalar; |
26 | |
27 | |
27 | BEGIN { |
28 | BEGIN { |
28 | $VERSION = 0.08; |
29 | $VERSION = '1.0'; |
29 | @ISA = qw(Exporter); |
30 | @ISA = qw(Exporter); |
30 | @EXPORT_OK = qw(weaken unmagic grow); |
31 | @EXPORT_OK = qw(weaken unmagic grow); |
31 | %EXPORT_TAGS = ( |
32 | %EXPORT_TAGS = ( |
32 | taint => [qw(taint untaint tainted)], |
33 | taint => [qw(taint untaint tainted)], |
33 | 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)], |
34 | refcnt => [qw(refcnt refcnt_inc refcnt_dec refcnt_rv refcnt_inc_rv refcnt_dec_rv)], |
35 | refcnt => [qw(refcnt refcnt_inc refcnt_dec refcnt_rv refcnt_inc_rv refcnt_dec_rv)], |
|
|
36 | ok => [qw(ok uok rok pok nok niok)], |
35 | ); |
37 | ); |
36 | |
38 | |
37 | require Exporter; |
39 | require Exporter; |
38 | Exporter::export_ok_tags(keys %EXPORT_TAGS); |
40 | Exporter::export_ok_tags(keys %EXPORT_TAGS); |
39 | |
41 | |
… | |
… | |
139 | instead if you understand what this function is fore. Better yet: don't |
141 | instead if you understand what this function is fore. Better yet: don't |
140 | use this module in this case. |
142 | use this module in this case. |
141 | |
143 | |
142 | =item refcnt_rv scalar[, newrefcnt] |
144 | =item refcnt_rv scalar[, newrefcnt] |
143 | |
145 | |
144 | Works like C<refcnt>, but dereferences the given reference first. Remember |
146 | Works like C<refcnt>, but dereferences the given reference first. This is |
145 | that taking a reference of some object increases it's reference count, so |
147 | useful to find the reference count of arrays or hashes, which cnanot be |
146 | the reference count used by the C<*_rv>-funtions tend to be one higher. |
148 | passed directly. Remember that taking a reference of some object increases |
|
|
149 | it's reference count, so the reference count used by the C<*_rv>-functions |
|
|
150 | tend to be one higher. |
147 | |
151 | |
148 | =item refcnt_inc_rv scalar |
152 | =item refcnt_inc_rv scalar |
149 | |
153 | |
150 | Works like C<refcnt_inc>, but dereferences the given reference first. |
154 | Works like C<refcnt_inc>, but dereferences the given reference first. |
151 | |
155 | |
152 | =item refcnt_dec_rv scalar |
156 | =item refcnt_dec_rv scalar |
153 | |
157 | |
154 | Works like C<refcnt_dec>, but dereferences the given reference first. |
158 | Works like C<refcnt_dec>, but dereferences the given reference first. |
|
|
159 | |
|
|
160 | =item ok scalar |
|
|
161 | |
|
|
162 | =item uok scalar |
|
|
163 | |
|
|
164 | =item rok scalar |
|
|
165 | |
|
|
166 | =item pok scalar |
|
|
167 | |
|
|
168 | =item nok scalar |
|
|
169 | |
|
|
170 | =item niok scalar |
|
|
171 | |
|
|
172 | Calls SvOK, SvUOK, SvROK, SvPOK, SvNOK or SvNIOK on the given scalar, |
|
|
173 | respectively. |
155 | |
174 | |
156 | =cut |
175 | =cut |
157 | |
176 | |
158 | 1; |
177 | 1; |
159 | |
178 | |