From: Grant M. <gr...@us...> - 2006-10-08 07:44:30
|
Update of /cvsroot/perl-xml/xml-simple/lib/XML In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19558/lib/XML Modified Files: Simple.pm Log Message: - add hook method: new_hashref() Index: Simple.pm =================================================================== RCS file: /cvsroot/perl-xml/xml-simple/lib/XML/Simple.pm,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- Simple.pm 5 Oct 2006 08:28:05 -0000 1.29 +++ Simple.pm 8 Oct 2006 07:44:26 -0000 1.30 @@ -1131,7 +1131,7 @@ my $name = shift; my $arrayref = shift; - my $hashref = {}; + my $hashref = $self->new_hashref; my($i, $key, $val, $flag); @@ -1203,6 +1203,20 @@ ############################################################################## +# Method: new_hashref() +# +# This is a hook routine for overriding in a sub-class. Some people believe +# that using Tie::IxHash here will solve order-loss problems. +# + +sub new_hashref { + my $self = shift; + + return { @_ }; +} + + +############################################################################## # Method: collapse_content() # # Helper routine for array_to_hash |