HTML::Detergent::Config - Configuration object for HTML::Detergent
This is an ARRAY reference of XPath expressions to try against the document, in order of preference. Entries optionally may be two-element ARRAY references themselves, the second element being a URL where an XSLT stylesheet may be found.
match => [ '/some/xpath/expression', [ '/other/expr', '/url/of/transform.xsl' ], ],
This is a HASH reference where the keys correspond to rel attributes and the values to href attributes of <link> elements. If the values are ARRAY references, they will be processed in document order. rel attributes will be sorted lexically. If a callback is supplied instead, the caller expects a result of the same form.
rel
href
<link>
link => { rel1 => 'href1', rel2 => [ qw(href2 href3) ] }, # or link => \&_link_cb,
This is a HASH reference where the keys correspond to name attributes and the values to content attributes of <meta> elements. If the values are ARRAY references, they will be processed in document order. name attributes will be sorted lexically. If a callback is supplied instead, the caller expects a result of the same form.
name
content
<meta>
meta => { name1 => 'content1', name2 => [ qw(content2 content3) ] }, # or meta => \&_meta_cb,
These callbacks will be passed into the internal XML::LibXSLT processor. See XML::LibXML::InputCallback for details.
callback => [ \&_match_cb, \&_open_cb, \&_read_cb, \&_close_cb ], # or callback => $icb, # isa XML::LibXML::InputCallback
List all stylesheets associated with an XPath expression.
Retrieve a stylesheet for a given XPath expression.
To install HTML::Detergent, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Detergent
CPAN shell
perl -MCPAN -e shell install HTML::Detergent
For more information on module installation, please visit the detailed CPAN module installation guide.