From: Grant M. <gr...@us...> - 2003-06-13 10:27:25
|
Update of /cvsroot/perl-xml/xml-simple/lib/XML In directory sc8-pr-cvs1:/tmp/cvs-serv25613/lib/XML Modified Files: Simple.pm Log Message: - patch for no variable expansion in attributes Index: Simple.pm =================================================================== RCS file: /cvsroot/perl-xml/xml-simple/lib/XML/Simple.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Simple.pm 20 May 2003 08:46:12 -0000 1.14 +++ Simple.pm 13 Jun 2003 10:27:20 -0000 1.15 @@ -53,7 +53,7 @@ @ISA = qw(Exporter); @EXPORT = qw(XMLin XMLout); @EXPORT_OK = qw(xml_in xml_out); -$VERSION = '2.07'; +$VERSION = '2.08'; $PREFERRED_PARSER = undef; my $StrictMode = 0; @@ -878,6 +878,16 @@ } + # Do variable substitutions + + if(my $var = $self->{_var_values}) { + while(my($key, $val) = each(%$attr)) { + $val =~ s{\$\{(\w+)\}}{ $self->get_var($1) }ge; + $attr->{$key} = $val; + } + } + + # Add any nested elements my($key, $val); @@ -2799,7 +2809,7 @@ =head1 STATUS -This version (2.07) is the current stable version. +This version (2.08) is the current stable version. =head1 SEE ALSO |