NAME

HTML::Extract::CPANModules - Extract CPAN module names from an HTML document

VERSION

This document describes version 0.04 of HTML::Extract::CPANModules (from Perl distribution HTML-Extract-CPANModules), released on 2016-03-07.

FUNCTIONS

extract_cpan_modules_from_html(%args) -> array[str]

Extract CPAN module names from an HTML document.

This function is not exported by default, but exportable.

Arguments ('*' denotes required arguments):

  • from_links => bool (default: 1)

    If set to true (the default), will try to extract module names from URLs. Some URLs are recognized, e.g.:

    https://metacpan.org/pod/Foo::Bar
    https://search.cpan.org/~user/Foo-Bar-1.23/lib/Foo/Bar.pm

    and so on. Currently, the CPAN module CPAN::Module::FromURL is used to recognize the URLs.

  • from_text => bool (default: 0)

    If set to true, will try to extract things that look like a Perl module name from text in HTML, e.g.: Foo::Bar, Baz::Qux::2048 (basically, anything that looks like a package name). This means that single words (package without a double colon and a subpackage) won't be picked up.

  • html* => str

Return value: (array[str])

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/HTML-Extract-CPANModules.

SOURCE

Source repository is at https://github.com/perlancar/perl-HTML-Extract-CPANModules.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Extract-CPANModules

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

CPAN::Module::FromURL

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.