From: sgunderson@bigfoot.com <> Date: Fri, 11 Aug 2006 22:16:37 +0000 (+0200) Subject: One less regex in the world... X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=67f086ab24afd2f1e213bc5318fc3dc2558c2ae0;p=xml-template One less regex in the world... --- diff --git a/XML/Template.pm b/XML/Template.pm index 4061167..3d4fad8 100644 --- a/XML/Template.pm +++ b/XML/Template.pm @@ -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; }