r54573 - in /branches/upstream/libphp-serialization-perl/current: Changes MANIFEST META.yml lib/PHP/Serialization.pm sort_hashes.patch t/10intRT48594.t

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Fri Mar 19 17:10:02 UTC 2010


Author: jawnsy-guest
Date: Fri Mar 19 17:09:55 2010
New Revision: 54573

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=54573
Log:
[svn-upgrade] Integrating new upstream version, libphp-serialization-perl (0.34)

Added:
    branches/upstream/libphp-serialization-perl/current/t/10intRT48594.t
Removed:
    branches/upstream/libphp-serialization-perl/current/sort_hashes.patch
Modified:
    branches/upstream/libphp-serialization-perl/current/Changes
    branches/upstream/libphp-serialization-perl/current/MANIFEST
    branches/upstream/libphp-serialization-perl/current/META.yml
    branches/upstream/libphp-serialization-perl/current/lib/PHP/Serialization.pm

Modified: branches/upstream/libphp-serialization-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libphp-serialization-perl/current/Changes?rev=54573&op=diff
==============================================================================
--- branches/upstream/libphp-serialization-perl/current/Changes (original)
+++ branches/upstream/libphp-serialization-perl/current/Changes Fri Mar 19 17:09:55 2010
@@ -1,4 +1,8 @@
 Revision history for Perl extension PHP::Serialization
+
+0.34  2010-03-18
+ - Fix keys and values like '010' being serialized as strings as expected
+   rather than being turned into ints. (RT#48594)
 
 0.33  2009-07-14
  - Added ability to store the order of the keys on decoding

Modified: branches/upstream/libphp-serialization-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libphp-serialization-perl/current/MANIFEST?rev=54573&op=diff
==============================================================================
--- branches/upstream/libphp-serialization-perl/current/MANIFEST (original)
+++ branches/upstream/libphp-serialization-perl/current/MANIFEST Fri Mar 19 17:09:55 2010
@@ -3,7 +3,6 @@
 Makefile.PL
 MANIFEST			This list of files
 README
-sort_hashes.patch
 t/01use.t
 t/02basic.t
 t/03largeints.t
@@ -13,4 +12,5 @@
 t/07croak.t
 t/08incompletestringRT44700.t
 t/09floatindexRT42029.t
+t/10intRT48594.t
 META.yml                                 Module meta-data (added by MakeMaker)

Modified: branches/upstream/libphp-serialization-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libphp-serialization-perl/current/META.yml?rev=54573&op=diff
==============================================================================
--- branches/upstream/libphp-serialization-perl/current/META.yml (original)
+++ branches/upstream/libphp-serialization-perl/current/META.yml Fri Mar 19 17:09:55 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               PHP-Serialization
-version:            0.33
+version:            0.34
 abstract:           simple flexible means of converting the output of PHP's serialize() into the equivalent Perl memory structure, and vice versa.
 author:
     - Jesse Brown <jbrown at cpan.org>
@@ -15,7 +15,7 @@
     directory:
         - t
         - inc
-generated_by:       ExtUtils::MakeMaker version 6.50
+generated_by:       ExtUtils::MakeMaker version 6.54
 meta-spec:
     url:      http://module-build.sourceforge.net/META-spec-v1.4.html
     version:  1.4

Modified: branches/upstream/libphp-serialization-perl/current/lib/PHP/Serialization.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libphp-serialization-perl/current/lib/PHP/Serialization.pm?rev=54573&op=diff
==============================================================================
--- branches/upstream/libphp-serialization-perl/current/lib/PHP/Serialization.pm (original)
+++ branches/upstream/libphp-serialization-perl/current/lib/PHP/Serialization.pm Fri Mar 19 17:09:55 2010
@@ -8,7 +8,7 @@
 
 use vars qw/$VERSION @ISA @EXPORT_OK/;
 
-$VERSION = '0.33';
+$VERSION = '0.34';
 
 @ISA = qw(Exporter);
 @EXPORT_OK = qw(unserialize serialize);
@@ -377,7 +377,7 @@
         return $self->_encode('obj', $val);
     }
     elsif ( ! ref($val) ) {
-        if ( $val =~ /^-?\d{1,10}$/ && abs($val) < 2**31 ) {
+        if ( $val =~ /^-?(?:[0-9]|[1-9]\d{1,10})$/ && abs($val) < 2**31 ) {
             return $self->_encode('int', $val);
         }
         elsif ( $val =~ /^-?\d+\.\d*$/ && !$iskey) {

Added: branches/upstream/libphp-serialization-perl/current/t/10intRT48594.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libphp-serialization-perl/current/t/10intRT48594.t?rev=54573&op=file
==============================================================================
--- branches/upstream/libphp-serialization-perl/current/t/10intRT48594.t (added)
+++ branches/upstream/libphp-serialization-perl/current/t/10intRT48594.t Fri Mar 19 17:09:55 2010
@@ -1,0 +1,15 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+
+use PHP::Serialization;
+use Test::More tests => 2;
+
+my $a = {'020' => '001'};
+my $str = PHP::Serialization::serialize( $a );
+is($str,'a:1:{s:3:"020";s:3:"001";}', 'Keys and vals are string for 0 prefixed numbers');
+
+my $b = {'0' => '0'};
+$str = PHP::Serialization::serialize( $b );
+is($str,'a:1:{i:0;i:0;}', 'Keys and vals are ints for 0');
+




More information about the Pkg-perl-cvs-commits mailing list