]> git.sesse.net Git - xml-template/commitdiff
One less regex in the world...
authorsgunderson@bigfoot.com <>
Fri, 11 Aug 2006 22:16:37 +0000 (00:16 +0200)
committersgunderson@bigfoot.com <>
Fri, 11 Aug 2006 22:16:37 +0000 (00:16 +0200)
XML/Template.pm

index 40611673988b94046cb990395833aabd7fb4209e..3d4fad856b1fd4d082dad1a40cc9fec25d071cdc 100644 (file)
@@ -89,7 +89,7 @@ sub process {
                                        }
 
                                        next if ($processed);
-                                       if ($key eq $tag || (defined($id) && $key =~ /^#\Q$id\E$/)) {
+                                       if ($key eq $tag || (defined($id) && $key eq ('#'.$id))) {
                                                process($child, $obj->{$key}, $clean, $nsup);
                                                $processed = 1;
                                        }