Skip to content

Commit

Permalink
find namespace a little faster
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 19, 2015
1 parent d9ddec2 commit ef927ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojo/DOM.pm
Expand Up @@ -86,7 +86,7 @@ sub namespace {

# Namespace for prefix
my $attrs = $n->[2];
if ($ns) { /^\Q$ns\E$/ and return $attrs->{$_} for keys %$attrs }
if ($ns) { $_ eq $ns and return $attrs->{$_} for keys %$attrs }

# Namespace attribute
elsif (defined $attrs->{xmlns}) { return $attrs->{xmlns} }
Expand Down

0 comments on commit ef927ee

Please sign in to comment.