Changeset 670

Show
Ignore:
Timestamp:
07/10/02 05:25:20
Author:
miyagawa
Message:

0.11: serialization fixed

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • PHP-Session/trunk/Changes

    r661 r670  
    11Revision history for Perl extension PHP::Session 
     2 
     30.11  Wed Jul 10 05:23:19 JST 2002 
     4        * Fixed bug in hash/array serialization 
     5          (Thanks to Pasha Sadri and Thai Tran) 
    26 
    370.10  Mon Jul  1 18:26:54 JST 2002 
  • PHP-Session/trunk/MANIFEST

    r659 r670  
    1111t/04_save.t 
    1212t/05_create.t 
     13t/06_hash.t 
    1314t/lib/TestUtil.pm 
  • PHP-Session/trunk/lib/PHP/Session.pm

    r661 r670  
    33use strict; 
    44use vars qw($VERSION); 
    5 $VERSION = '0.10'; 
     5$VERSION = '0.11'; 
    66 
    77use vars qw(%SerialImpl); 
  • PHP-Session/trunk/lib/PHP/Session/Serializer/PHP.pm

    r661 r670  
    55 
    66use vars qw($VERSION); 
    7 $VERSION = '0.10'; 
     7$VERSION = '0.11'; 
    88 
    99sub _croak { require Carp; Carp::croak(@_) } 
     
    155155    my($self, $value) = @_; 
    156156    my %array = ref $value eq 'HASH' ? %$value : map { $_ => $value->[$_] } 0..$#{$value}; 
    157     return sprintf 'a:%d:{%s}', 2 * (keys %array), join('', map $self->do_encode($_), %array); 
     157    return sprintf 'a:%d:{%s}', scalar(keys %array), join('', map $self->do_encode($_), %array); 
    158158} 
    159159