Convert-Scalar

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
        - some functions now return the modified scalar, enabling a more
          "functional" style, e.g. return utf2, join "",...;
 
0.03  Sun Sep  3 04:55:53 CEST 2000
        - added "utf8/utf8_on/utf8_off" functions.
        - added grow as an interface to sv_grow.
        - added "tainted" and fixed taint/untaint to use the published
          interface.
 
0.02  Sat Jul 15 22:37:36 CEST 2000
        - added missing functions weaken and unmagic to EXPORT_OK.
          This happens when you upload too quickly :*]
 
0.01  Sat Jul 15 20:15:47 CEST 2000
        - original version; leftover "garbage" from the PApp module

README  view on Meta::CPAN

69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
readonly_on scalar
    Sets the readonly flag on the scalar.
 
readonly_off scalar
    Clears the readonly flag on the scalar.
 
unmagic scalar, type
    Remove the specified magic from the scalar (DANGEROUS!).
 
weaken scalar
    Weaken a reference. (See also WeakRef).
 
taint scalar
    Taint the scalar.
 
tainted scalar
    returns true when the scalar is tainted, false otherwise.
 
untaint scalar
    Remove the tainted flag from the specified scalar.

README  view on Meta::CPAN

140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
refcnt scalar[, newrefcnt]
    Returns the current reference count of the given scalar and
    optionally sets it to the given reference count.
 
refcnt_inc scalar
    Increments the reference count of the given scalar inplace.
 
refcnt_dec scalar
    Decrements the reference count of the given scalar inplace. Use
    "weaken" instead if you understand what this function is fore.
    Better yet: don't use this module in this case.
 
refcnt_rv scalar[, newrefcnt]
    Works like "refcnt", but dereferences the given reference first.
    This is useful to find the reference count of arrays or hashes,
    which cannot be passed directly. Remember that taking a reference of
    some object increases it's reference count, so the reference count
    used by the *_rv-functions tend to be one higher.
 
refcnt_inc_rv scalar

Scalar.pm  view on Meta::CPAN

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
=over 4
 
=cut
 
 
BEGIN {
   $VERSION = 1.12;
   @ISA = qw(Exporter);
   @EXPORT_OK = qw(readonly readonly_on readonly_off weaken unmagic len grow extend extend_read readall writeall);
   %EXPORT_TAGS = (
      taint  => [qw(taint untaint tainted)],
      utf8   => [qw(utf8 utf8_on utf8_off utf8_valid utf8_upgrade utf8_downgrade utf8_encode utf8_decode utf8_length)],
      refcnt => [qw(refcnt refcnt_inc refcnt_dec refcnt_rv refcnt_inc_rv refcnt_dec_rv)],
      ok     => [qw(ok uok rok pok nok niok)],
   );
 
   require Exporter;
   Exporter::export_ok_tags(keys %EXPORT_TAGS);

Scalar.pm  view on Meta::CPAN

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
Sets the readonly flag on the scalar.
 
=item readonly_off scalar
 
Clears the readonly flag on the scalar.
 
=item unmagic scalar, type
 
Remove the specified magic from the scalar (DANGEROUS!).
 
=item weaken scalar
 
Weaken a reference. (See also L<WeakRef>).
 
=item taint scalar
 
Taint the scalar.
 
=item tainted scalar
 
returns true when the scalar is tainted, false otherwise.

Scalar.pm  view on Meta::CPAN

186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
Returns the current reference count of the given scalar and optionally sets it to
the given reference count.
 
=item refcnt_inc scalar
 
Increments the reference count of the given scalar inplace.
 
=item refcnt_dec scalar
 
Decrements the reference count of the given scalar inplace. Use C<weaken>
instead if you understand what this function is fore. Better yet: don't
use this module in this case.
 
=item refcnt_rv scalar[, newrefcnt]
 
Works like C<refcnt>, but dereferences the given reference first. This is
useful to find the reference count of arrays or hashes, which cannot be
passed directly. Remember that taking a reference of some object increases
it's reference count, so the reference count used by the C<*_rv>-functions
tend to be one higher.

Scalar.xs  view on Meta::CPAN

149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
readonly_off (SV *scalar)
        CODE:
        SvREADONLY_off (scalar);
 
void
unmagic (SV *scalar, char type)
        CODE:
        sv_unmagic (scalar, type);
 
void
weaken (SV *scalar)
        CODE:
        sv_rvweaken (scalar);
 
void
taint (SV *scalar)
        CODE:
        SvTAINTED_on (scalar);
 
bool
tainted (SV *scalar)
        CODE:
        RETVAL = !!SvTAINTED (scalar);



( run in 0.335 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )