Convert-Scalar-1.12/0000755000000000000000000000000013144521271012756 5ustar rootrootConvert-Scalar-1.12/Scalar.pm0000644000000000000000000001645013144504654014535 0ustar rootroot=head1 NAME Convert::Scalar - convert between different representations of perl scalars =head1 SYNOPSIS use Convert::Scalar; =head1 DESCRIPTION This module exports various internal perl methods that change the internal representation or state of a perl scalar. All of these work in-place, that is, they modify their scalar argument. No functions are exported by default. The following export tags exist: :utf8 all functions with utf8 in their name :taint all functions with taint in their name :refcnt all functions with refcnt in their name :ok all *ok-functions. =over 4 =cut package Convert::Scalar; 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); require XSLoader; XSLoader::load Convert::Scalar, $VERSION; } =item utf8 scalar[, mode] Returns true when the given scalar is marked as utf8, false otherwise. If the optional mode argument is given, also forces the interpretation of the string to utf8 (mode true) or plain bytes (mode false). The actual (byte-) content is not changed. The return value always reflects the state before any modification is done. This function is useful when you "import" utf8-data into perl, or when some external function (e.g. storing/retrieving from a database) removes the utf8-flag. =item utf8_on scalar Similar to C, but additionally returns the scalar (the argument is still modified in-place). =item utf8_off scalar Similar to C, but additionally returns the scalar (the argument is still modified in-place). =item utf8_valid scalar [Perl 5.7] Returns true if the bytes inside the scalar form a valid utf8 string, false otherwise (the check is independent of the actual encoding perl thinks the string is in). =item utf8_upgrade scalar Convert the string content of the scalar in-place to its UTF8-encoded form (and also returns it). =item utf8_downgrade scalar[, fail_ok=0] Attempt to convert the string content of the scalar from UTF8-encoded to ISO-8859-1. This may not be possible if the string contains characters that cannot be represented in a single byte; if this is the case, it leaves the scalar unchanged and either returns false or, if C is not true (the default), croaks. =item utf8_encode scalar Convert the string value of the scalar to UTF8-encoded, but then turn off the C flag so that it looks like bytes to perl again. (Might be removed in future versions). =item utf8_length scalar Returns the number of characters in the string, counting wide UTF8 characters as a single character, independent of wether the scalar is marked as containing bytes or mulitbyte characters. =item $old = readonly scalar[, $new] Returns whether the scalar is currently readonly, and sets or clears the readonly status if a new status is given. =item readonly_on scalar 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). =item taint scalar Taint the scalar. =item tainted scalar returns true when the scalar is tainted, false otherwise. =item untaint scalar Remove the tainted flag from the specified scalar. =item length = len scalar Returns SvLEN (scalar), that is, the actual number of bytes allocated to the string value, or C, is the scalar has no string value. =item scalar = grow scalar, newlen Sets the memory area used for the scalar to the given length, if the current length is less than the new value. This does not affect the contents of the scalar, but is only useful to "pre-allocate" memory space if you know the scalar will grow. The return value is the modified scalar (the scalar is modified in-place). =item scalar = extend scalar, addlen=64 Reserves enough space in the scalar so that addlen bytes can be appended without reallocating it. The actual contents of the scalar will not be affected. The modified scalar will also be returned. This function is meant to make append workloads efficient - if you append a short string to a scalar many times (millions of times), then perl will have to reallocate and copy the scalar basically every time. If you instead use C, then Convert::Scalar will use a "size to next power of two, roughly" algorithm, so as the scalar grows, perl will have to resize and copy it less and less often. =item nread = extend_read fh, scalar, addlen=64 Calls C to ensure some space is available, then do the equivalent of C to the end, to try to fill the extra space. Returns how many bytes have been read, C<0> on EOF or undef> on eror, just like C. This function is useful to implement many protocols where you read some data, see if it is enough to decode, and if not, read some more, where the naive or easy way of doing this would result in bad performance. =item nread = read_all fh, scalar, length Tries to read C bytes into C. Unlike C or C, it will try to read more bytes if not all bytes could be read in one go (this is often called C in C). Returns the total nunmber of bytes read (normally C, unless an error or EOF occured), C<0> on EOF and C on errors. =item nwritten = write_all fh, scalar Like C, but for writes - the equivalent of the C function often seen in C. =item refcnt scalar[, newrefcnt] 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 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, 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. =item refcnt_inc_rv scalar Works like C, but dereferences the given reference first. =item refcnt_dec_rv scalar Works like C, but dereferences the given reference first. =item ok scalar =item uok scalar =item rok scalar =item pok scalar =item nok scalar =item niok scalar Calls SvOK, SvUOK, SvROK, SvPOK, SvNOK or SvNIOK on the given scalar, respectively. =back =head2 CANDIDATES FOR FUTURE RELEASES The following API functions (L) are considered for future inclusion in this module If you want them, write me. sv_upgrade sv_pvn_force sv_pvutf8n_force the sv2xx family =head1 AUTHOR Marc Lehmann http://home.schmorp.de/ =cut 1 Convert-Scalar-1.12/Scalar.xs0000644000000000000000000001611213144513474014546 0ustar rootroot#include "EXTERN.h" #include "perl.h" #include "XSUB.h" #define RETCOPY(sv) \ if (GIMME_V != G_VOID) \ { \ dXSTARG; \ sv_setsv (TARG, (sv)); \ EXTEND (SP, 1); \ PUSHs (TARG); \ } static void extend (SV *scalar, STRLEN addlen) { SvUPGRADE (scalar, SVt_PV); STRLEN cur = SvCUR (scalar); STRLEN len = SvLEN (scalar); if (cur + addlen < len) return; STRLEN l = len; STRLEN o = cur + addlen >= 4096 ? sizeof (void *) * 4 : 0; if (l < 64) l = 64; /* for big sizes, leave a bit of space for malloc management, and assume 4kb or smaller pages */ addlen += o; while (cur + addlen >= l) l <<= 1; sv_grow (scalar, l - o); } MODULE = Convert::Scalar PACKAGE = Convert::Scalar TYPEMAP: < 1) { if (SvREADONLY (scalar)) croak ("Convert::Scalar::utf8 called on read only scalar"); if (SvTRUE (mode)) SvUTF8_on (scalar); else SvUTF8_off (scalar); } OUTPUT: RETVAL void utf8_on (SV *scalar) PPCODE: if (SvREADONLY (scalar)) croak ("Convert::Scalar::utf8_on called on read only scalar"); SvGETMAGIC (scalar); SvUTF8_on (scalar); RETCOPY (scalar); void utf8_off (SV *scalar) PPCODE: if (SvREADONLY (scalar)) croak ("Convert::Scalar::utf8_off called on read only scalar"); SvGETMAGIC (scalar); SvUTF8_off (scalar); RETCOPY (scalar); int utf8_valid (SV *scalar) CODE: STRLEN len; char *str = SvPV (scalar, len); RETVAL = !!is_utf8_string (str, len); OUTPUT: RETVAL void utf8_upgrade (SV *scalar) PPCODE: if (SvREADONLY (scalar)) croak ("Convert::Scalar::utf8_upgrade called on read only scalar"); sv_utf8_upgrade(scalar); RETCOPY (scalar); bool utf8_downgrade (SV *scalar, bool fail_ok = 0) CODE: if (SvREADONLY (scalar)) croak ("Convert::Scalar::utf8_downgrade called on read only scalar"); RETVAL = !!sv_utf8_downgrade (scalar, fail_ok); OUTPUT: RETVAL void utf8_encode (SV *scalar) PPCODE: if (SvREADONLY (scalar)) croak ("Convert::Scalar::utf8_encode called on read only scalar"); sv_utf8_encode (scalar); RETCOPY (scalar); UV utf8_length (SV *scalar) CODE: RETVAL = (UV) utf8_length (SvPV_nolen (scalar), SvEND (scalar)); OUTPUT: RETVAL bool readonly (SV *scalar, SV *on = NO_INIT) CODE: RETVAL = SvREADONLY (scalar); if (items > 1) { if (SvTRUE (on)) SvREADONLY_on (scalar); else SvREADONLY_off (scalar); } OUTPUT: RETVAL void readonly_on (SV *scalar) CODE: SvREADONLY_on (scalar); void 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); OUTPUT: RETVAL void untaint (SV *scalar) CODE: SvTAINTED_off (scalar); STRLEN len (SV *scalar) CODE: if (SvTYPE (scalar) < SVt_PV) XSRETURN_UNDEF; RETVAL = SvLEN (scalar); OUTPUT: RETVAL void grow (SV *scalar, STRLEN newlen) PPCODE: sv_grow (scalar, newlen); if (GIMME_V != G_VOID) XPUSHs (sv_2mortal (SvREFCNT_inc (scalar))); void extend (SV *scalar, STRLEN addlen = 64) PPCODE: { extend (scalar, addlen); if (GIMME_V != G_VOID) XPUSHs (sv_2mortal (SvREFCNT_inc (scalar))); } SSize_t extend_read (PerlIO *fh, SV *scalar, STRLEN addlen = 64) CODE: { if (SvUTF8 (scalar)) sv_utf8_downgrade (scalar, 0); extend (scalar, addlen); RETVAL = PerlLIO_read (PerlIO_fileno (fh), SvEND (scalar), SvLEN (scalar) - SvCUR (scalar)); if (RETVAL < 0) XSRETURN_UNDEF; SvPOK_only (scalar); SvCUR_set (scalar, SvCUR (scalar) + RETVAL); } OUTPUT: RETVAL SSize_t read_all (PerlIO *fh, SV *scalar, STRLEN count) CODE: { SvUPGRADE (scalar, SVt_PV); if (SvUTF8 (scalar)) sv_utf8_downgrade (scalar, 0); SvPOK_only (scalar); int fd = PerlIO_fileno (fh); RETVAL = 0; SvGROW (scalar, count); for (;;) { STRLEN rem = count - RETVAL; if (!rem) break; STRLEN got = PerlLIO_read (fd, SvPVX (scalar) + RETVAL, rem); if (got == 0) break; else if (got < 0) if (RETVAL) break; else XSRETURN_UNDEF; RETVAL += got; } SvCUR_set (scalar, RETVAL); } OUTPUT: RETVAL SSize_t write_all (PerlIO *fh, SV *scalar) CODE: { STRLEN count; char *ptr = SvPVbyte (scalar, count); int fd = PerlIO_fileno (fh); RETVAL = 0; for (;;) { STRLEN rem = count - RETVAL; if (!rem) break; STRLEN got = PerlLIO_write (fd, ptr + RETVAL, rem); if (got < 0) if (RETVAL) break; else XSRETURN_UNDEF; RETVAL += got; } } OUTPUT: RETVAL int refcnt (SV *scalar, U32 newrefcnt = NO_INIT) ALIAS: refcnt_rv = 1 CODE: if (ix) { if (!SvROK (scalar)) croak ("refcnt_rv requires a reference as it's first argument"); scalar = SvRV (scalar); } RETVAL = SvREFCNT (scalar); if (items > 1) SvREFCNT (scalar) = newrefcnt; OUTPUT: RETVAL void refcnt_inc (SV *scalar) ALIAS: refcnt_inc_rv = 1 CODE: if (ix) { if (!SvROK (scalar)) croak ("refcnt_inc_rv requires a reference as it's first argument"); scalar = SvRV (scalar); } SvREFCNT_inc (scalar); void refcnt_dec (SV *scalar) ALIAS: refcnt_dec_rv = 1 CODE: if (ix) { if (!SvROK (scalar)) croak ("refcnt_dec_rv requires a reference as it's first argument"); scalar = SvRV (scalar); } SvREFCNT_dec (scalar); bool ok (SV *scalar) CODE: RETVAL = !!SvOK (scalar); OUTPUT: RETVAL bool uok (SV *scalar) CODE: RETVAL = !!SvUOK (scalar); OUTPUT: RETVAL bool rok (SV *scalar) CODE: RETVAL = !!SvROK (scalar); OUTPUT: RETVAL bool pok (SV *scalar) CODE: RETVAL = !!SvPOK (scalar); OUTPUT: RETVAL bool nok (SV *scalar) CODE: RETVAL = !!SvNOK (scalar); OUTPUT: RETVAL bool niok (SV *scalar) CODE: RETVAL = !!SvNIOK (scalar); OUTPUT: RETVAL Convert-Scalar-1.12/Makefile.PL0000644000000000000000000000102313144506502014724 0ustar rootrootuse ExtUtils::MakeMaker; use Canary::Stability Convert::Scalar => 1, 5.008; WriteMakefile( dist => { PREOP => 'pod2text Scalar.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', COMPRESS => 'gzip -9v', SUFFIX => '.gz', }, NAME => "Convert::Scalar", VERSION_FROM => "Scalar.pm", CONFIGURE_REQUIRES => { "ExtUtils::MakeMaker" => 6.6, "Canary::Stability" => 0, }, BUILD_REQUIRES => { ExtUtils::ParseXS => 3.28, }, ); Convert-Scalar-1.12/README0000644000000000000000000001630313144521271013641 0ustar rootrootNAME Convert::Scalar - convert between different representations of perl scalars SYNOPSIS use Convert::Scalar; DESCRIPTION This module exports various internal perl methods that change the internal representation or state of a perl scalar. All of these work in-place, that is, they modify their scalar argument. No functions are exported by default. The following export tags exist: :utf8 all functions with utf8 in their name :taint all functions with taint in their name :refcnt all functions with refcnt in their name :ok all *ok-functions. utf8 scalar[, mode] Returns true when the given scalar is marked as utf8, false otherwise. If the optional mode argument is given, also forces the interpretation of the string to utf8 (mode true) or plain bytes (mode false). The actual (byte-) content is not changed. The return value always reflects the state before any modification is done. This function is useful when you "import" utf8-data into perl, or when some external function (e.g. storing/retrieving from a database) removes the utf8-flag. utf8_on scalar Similar to "utf8 scalar, 1", but additionally returns the scalar (the argument is still modified in-place). utf8_off scalar Similar to "utf8 scalar, 0", but additionally returns the scalar (the argument is still modified in-place). utf8_valid scalar [Perl 5.7] Returns true if the bytes inside the scalar form a valid utf8 string, false otherwise (the check is independent of the actual encoding perl thinks the string is in). utf8_upgrade scalar Convert the string content of the scalar in-place to its UTF8-encoded form (and also returns it). utf8_downgrade scalar[, fail_ok=0] Attempt to convert the string content of the scalar from UTF8-encoded to ISO-8859-1. This may not be possible if the string contains characters that cannot be represented in a single byte; if this is the case, it leaves the scalar unchanged and either returns false or, if "fail_ok" is not true (the default), croaks. utf8_encode scalar Convert the string value of the scalar to UTF8-encoded, but then turn off the "SvUTF8" flag so that it looks like bytes to perl again. (Might be removed in future versions). utf8_length scalar Returns the number of characters in the string, counting wide UTF8 characters as a single character, independent of wether the scalar is marked as containing bytes or mulitbyte characters. $old = readonly scalar[, $new] Returns whether the scalar is currently readonly, and sets or clears the readonly status if a new status is given. 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. length = len scalar Returns SvLEN (scalar), that is, the actual number of bytes allocated to the string value, or "undef", is the scalar has no string value. scalar = grow scalar, newlen Sets the memory area used for the scalar to the given length, if the current length is less than the new value. This does not affect the contents of the scalar, but is only useful to "pre-allocate" memory space if you know the scalar will grow. The return value is the modified scalar (the scalar is modified in-place). scalar = extend scalar, addlen=64 Reserves enough space in the scalar so that addlen bytes can be appended without reallocating it. The actual contents of the scalar will not be affected. The modified scalar will also be returned. This function is meant to make append workloads efficient - if you append a short string to a scalar many times (millions of times), then perl will have to reallocate and copy the scalar basically every time. If you instead use "extend $scalar, length $shortstring", then Convert::Scalar will use a "size to next power of two, roughly" algorithm, so as the scalar grows, perl will have to resize and copy it less and less often. nread = extend_read fh, scalar, addlen=64 Calls "extend scalar, addlen" to ensure some space is available, then do the equivalent of "sysread" to the end, to try to fill the extra space. Returns how many bytes have been read, 0 on EOF or undef> on eror, just like "sysread". This function is useful to implement many protocols where you read some data, see if it is enough to decode, and if not, read some more, where the naive or easy way of doing this would result in bad performance. nread = read_all fh, scalar, length Tries to read "length" bytes into "scalar". Unlike "read" or "sysread", it will try to read more bytes if not all bytes could be read in one go (this is often called "xread" in C). Returns the total nunmber of bytes read (normally "length", unless an error or EOF occured), 0 on EOF and "undef" on errors. nwritten = write_all fh, scalar Like "readall", but for writes - the equivalent of the "xwrite" function often seen in C. 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 Works like "refcnt_inc", but dereferences the given reference first. refcnt_dec_rv scalar Works like "refcnt_dec", but dereferences the given reference first. ok scalar uok scalar rok scalar pok scalar nok scalar niok scalar Calls SvOK, SvUOK, SvROK, SvPOK, SvNOK or SvNIOK on the given scalar, respectively. CANDIDATES FOR FUTURE RELEASES The following API functions (perlapi) are considered for future inclusion in this module If you want them, write me. sv_upgrade sv_pvn_force sv_pvutf8n_force the sv2xx family AUTHOR Marc Lehmann http://home.schmorp.de/ Convert-Scalar-1.12/t/0000755000000000000000000000000013144521271013221 5ustar rootrootConvert-Scalar-1.12/t/00_load.t0000644000000000000000000000017511664557732014647 0ustar rootrootBEGIN { $| = 1; print "1..1\n"; } END {print "not ok 1\n" unless $loaded;} use Convert::Scalar; $loaded = 1; print "ok 1\n"; Convert-Scalar-1.12/t/03_refcnt.t0000644000000000000000000000056111664557732015213 0ustar rootrootBEGIN { $| = 1; print "1..4\n"; } use Convert::Scalar ':refcnt'; no bytes; my $x = 5; print refcnt($x) == 1 ? "" : "not ", "ok 1\n"; print refcnt($x,2) == 1 ? "" : "not ", "ok 2\n"; refcnt_inc_rv \$x; print refcnt_rv(\$x,2) == 4 ? "" : "not ", "ok 3\n"; refcnt_inc $x; refcnt_inc_rv \$x; refcnt_dec $x; print refcnt($x) == 2 ? "" : "not ", "ok 4\n"; refcnt_dec $x; Convert-Scalar-1.12/t/02_call.t0000644000000000000000000000034611664557732014645 0ustar rootrootBEGIN { $| = 1; print "1..4\n"; } use Convert::Scalar qw(:taint grow); $b = "1234"; # difficult to test these grow $b, 5000; print "ok 1\n"; taint $b; print "ok 2\n"; tainted $b; print "ok 3\n"; untaint $b; print "ok 4\n"; Convert-Scalar-1.12/t/01_utf8.t0000644000000000000000000000241511664557732014616 0ustar rootrootBEGIN { $| = 1; print "1..21\n"; } use Convert::Scalar ':utf8'; no bytes; $y = "\xff\x90\x44"; utf8_encode $y; print length($y)==5 ? "" : "not ", "ok 1\n"; print utf8_length($y)==3 ? "" : "not ", "ok 2\n"; utf8_upgrade $y; print utf8_length($y)==5 ? "" : "not ", "ok 3\n"; print length($y)==5 ? "" : "not ", "ok 4\n"; print utf8_downgrade($y) ? "" : "not ", "ok 5\n"; print utf8_length($y)==3 ? "" : "not ", "ok 6\n"; print length($y)==5 ? "" : "not ", "ok 7\n"; $y = "\x{257}"; print !utf8_downgrade($y, 1) ? "" : "not ", "ok 8\n"; print !eval { utf8_downgrade($y, 0); 1; } ? "" : "not ", "ok 9\n"; $b = "1234\xc0"; { use utf8; $u = "\x{1234}"; } print utf8($b) ? "not " : "", "ok 10\n"; print utf8($u) ? "" : "not ", "ok 11\n"; print utf8($b) ? "not " : "", "ok 12\n"; print utf8($u) ? "" : "not ", "ok 13\n"; utf8 $b,1; utf8_off $u; print utf8($b) ? "" : "not ", "ok 14\n"; print utf8($u) ? "not " : "", "ok 15\n"; if ($] < 5.007) { print "ok 16\n"; print "ok 17\n"; } else { print utf8_valid $b ? "not " : "", "ok 16\n"; print utf8_valid $u ? "" : "not ", "ok 17\n"; } print utf8_on($u) eq $u ? "" : "not ", "ok 18\n"; print utf8($u) ? "" : "not ", "ok 19\n"; print utf8_off($u) eq $u ? "" : "not ", "ok 20\n"; print utf8($u) ? "not " : "", "ok 21\n"; Convert-Scalar-1.12/MANIFEST0000644000000000000000000000043213144521271014106 0ustar rootrootREADME Changes MANIFEST COPYING Makefile.PL Scalar.pm Scalar.xs t/00_load.t t/01_utf8.t t/02_call.t t/03_refcnt.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) Convert-Scalar-1.12/COPYING0000644000000000000000000000007611664557732014034 0ustar rootrootThis module is licensed under the same terms as perl itself. Convert-Scalar-1.12/Changes0000644000000000000000000000476413144507106014265 0ustar rootrootRevision history for Perl extension Convert::Scalar 1.12 Tue Aug 15 08:01:36 CEST 2017 - add read_extend, read_all, write_all function. - assume c99 or higher, if not already. - extend addlen is now optional and defaults to 64. - use automatic prototype generation - this should *not* change any existing prototypes. 1.11 Thu Jun 25 16:01:36 CEST 2015 - fix unmagic prototype. - added stability canary support. 1.1 Thu Aug 18 20:59:01 CEST 2011 - added readonly, readonly_on, readonly_off. - add extend and len. - modernise xs syntax, make some functions more efficient. 1.04 Fri Mar 7 11:32:53 CET 2008 - work around 5.10 api changes in *ok functions (reported by David Aguilar). 1.03 Thu Mar 3 18:00:52 CET 2005 - require perl 5.008. - change of contact address. 1.02 Fri Nov 26 22:04:10 CET 2004 - return copies in all string-modifying functions instead of the string itself. 1.01 Sat Apr 24 08:38:21 CEST 2004 - minor documentation corrections. 1.0 Sat Apr 24 08:21:11 CEST 2004 - minor documentation corrections. 0.1 Wed Feb 12 21:40:14 CET 2003 - added *ok functions. 0.09 Mon Sep 23 05:40:41 CEST 2002 - fixed utf8_length to actually work as documented. 0.08 Fri Jul 5 13:44:17 CEST 2002 - check for readonly scalars before attempting to do utf8 conversions. perl will fail badly if not. 0.07 Sun Jan 20 04:50:53 CET 2002 - added refcnt_inc, refcnt_dec, refcnt etc. methods. 0.06 Thu Jan 4 02:24:23 CET 2001 - utf8_upgrade now really returns the argument - all functions that return the argument now do so correctly in all cases, but only when called in a non-void context. 0.05 Thu Dec 7 03:54:50 CET 2000 - now handles get magic in the utf8 functions. I'm not sure wether to SvGETMAGIC the other calls (sv_grow, sv_taint). 0.04 Thu Sep 14 21:00:46 CEST 2000 - 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 Convert-Scalar-1.12/META.yml0000644000000000000000000000077413144521271014237 0ustar rootroot--- abstract: unknown author: - unknown build_requires: ExtUtils::ParseXS: '3.28' configure_requires: Canary::Stability: '0' ExtUtils::MakeMaker: '6.6' dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 7.3, CPAN::Meta::Converter version 2.150010' license: unknown meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Convert-Scalar no_index: directory: - t - inc version: 1.12 x_serialization_backend: 'CPAN::Meta::YAML version 0.012' Convert-Scalar-1.12/META.json0000644000000000000000000000150413144521271014377 0ustar rootroot{ "abstract" : "unknown", "author" : [ "unknown" ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.3, CPAN::Meta::Converter version 2.150010", "license" : [ "unknown" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Convert-Scalar", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::ParseXS" : "3.28" } }, "configure" : { "requires" : { "Canary::Stability" : "0", "ExtUtils::MakeMaker" : "6.6" } } }, "release_status" : "stable", "version" : 1.12, "x_serialization_backend" : "JSON::PP version 2.27300" }