5.10 is actually required for possessive quantifiers
[catagits/DOM-Tiny.git] / lib / DOM / Tiny / HTML.pm
index 48a89e0..faec2f5 100644 (file)
@@ -121,7 +121,7 @@ sub parse {
         # Attributes
         my (%attrs, $closing);
         while ($attr =~ /$ATTR_RE/go) {
-          my ($key, $value) = ($xml ? $1 : lc $1, defined $3 ? $3 : $4);
+          my ($key, $value) = ($xml ? $1 : lc $1, $3 // $4);
 
           # Empty tag
           ++$closing and next if $key eq '/';