1. Shlomi Fish
  2. perl-XML-LibXML

Pull requests

#11 Merged
Repository
p5-xml-libxml
Branch
default
Repository
perl-XML-LibXML
Branch
default

XML::LibXML::NodeList improvements

Author
  1. Toby Inkster
Reviewers
Description

These commits make XML::LibXML::NodeList more useful, providing ways to map, grep, sort, reverse, etc node lists.

The intention is to make one-liners easier. Things like:

perl -MXML::LibXML -E'XML::LibXML->load_xml(location => "myfile.xml")->findnodes("//warning")->foreach(sub{say $_->textContent})'

Test cases and documentation are included, and the changes introduce no additional dependencies.

  • Learn about pull requests

Comments (1)

  1. Toby Inkster author

    That one-liner got mangled by bitbucket...

    perl -MXML::LibXML -E'XML::LibXML->load_xml(location => "myfile.xml")->findnodes("//warning")->foreach(sub{say $_->textContent})'