Skip to content

Commit

Permalink
Put in a feature for checking if an attribute exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
supernovus committed Jan 12, 2011
1 parent f28c7c9 commit b68218d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Exemel.pm
Expand Up @@ -192,7 +192,12 @@ class Exemel::Element does Exemel {
if $node.name ne $val { $matched = False; }
}
else {
if $node.attribs{$key} ne $val { $matched = False; }
if ($val ~~ Bool) {
if ! $node.attribs.exists($key) { $matched = False; }
}
else {
if $node.attribs{$key} ne $val { $matched = False; }
}
}
}
if $matched {
Expand Down

0 comments on commit b68218d

Please sign in to comment.