From: Grant M. <gr...@us...> - 2006-04-28 22:43:42
|
Update of /cvsroot/perl-xml/xml-simple/lib/XML In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27603/lib/XML Modified Files: Simple.pm Log Message: - allow '.' characters in variable names Index: Simple.pm =================================================================== RCS file: /cvsroot/perl-xml/xml-simple/lib/XML/Simple.pm,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- Simple.pm 29 Jan 2005 04:16:10 -0000 1.23 +++ Simple.pm 28 Apr 2006 22:43:36 -0000 1.24 @@ -894,7 +894,7 @@ if(my $var = $self->{_var_values}) { while(my($key, $val) = each(%$attr)) { - $val =~ s{\$\{(\w+)\}}{ $self->get_var($1) }ge; + $val =~ s{\$\{([\w.]+)\}}{ $self->get_var($1) }ge; $attr->{$key} = $val; } } @@ -2540,6 +2540,8 @@ value or in the text content of an element. If 'name' matches a key in the supplied hashref, C<${name}> will be replaced with the corresponding value from the hashref. If no matching key is found, the variable will not be replaced. +Names must match the regex: C<[\w.]+> (ie: only 'word' characters and dots are +allowed). =head2 VarAttr => 'attr_name' I<# in - handy> |