- or download this
$ perl -MMojo::DOM -E 'my $dom = Mojo::DOM::->new("<p></p>"); my $x =
+$dom->at("p.missing")->text(); say defined $x ? "not missing" : "real
+ly missing"'
Can't call method "text" on an undefined value at -e line 1.
- or download this
$ perl -MMojo::DOM -E 'my $dom = Mojo::DOM::->new("<p></p>"); my $x =
+$dom->at("p.missing"); say defined $x ? "not missing" : "really missi
+ng"'
really missing
- or download this
$ perl -MMojo::DOM -E 'my $dom = Mojo::DOM::->new(q{<p class="missing"
+></p>"}); my $x = $dom->at("p.missing"); say defined $x ? "not missin
+g" : "really missing"'
not missing