App-ExtractCPANModulesFromHTML
view release on metacpan or search on metacpan
bin/extract-cpan-modules-from-html view on Meta::CPAN
Do not read environment for default options.
=back
=head2 Input options
=over
=item B<--html>=I<s>*
=back
=head2 Output options
=over
=item B<--format>=I<s>
Choose output format, e.g. json, text.
Default value:
undef
=item B<--json>
Set output format to json.
=item B<--naked-res>
When outputing as JSON, strip result envelope.
Default value:
0
By default, when outputing as JSON, the full enveloped result is returned, e.g.:
[200,"OK",[1,2,3],{"func.extra"=>4}]
The reason is so you can get the status (1st element), status message (2nd
element) as well as result metadata/extra result (4th element) instead of just
the result (3rd element). However, sometimes you want just the result, e.g. when
you want to pipe the result for more post-processing. In this case you can use
`--naked-res` so you just get:
[1,2,3]
=back
=head2 Other options
=over
=item B<--from-text>
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.
=item B<--help>, B<-h>, B<-?>
Display help message and exit.
=item B<--no-from-links>
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.
=item B<--version>, B<-v>
Display program's version and exit.
=back
=head1 COMPLETION
This script has shell tab completion capability with support for several
shells.
=head2 bash
To activate bash completion for this script, put:
complete -C extract-cpan-modules-from-html extract-cpan-modules-from-html
in your bash startup (e.g. C<~/.bashrc>). Your next shell session will then
recognize tab completion for the command. Or, you can also directly execute the
line above in your shell to activate immediately.
It is recommended, however, that you install L<shcompgen> which allows you to
activate completion scripts for several kinds of scripts on multiple shells.
Some CPAN distributions (those that are built with
L<Dist::Zilla::Plugin::GenShellCompletion>) will even automatically enable shell
completion for their included scripts (using C<shcompgen>) at installation time,
so you can immadiately have tab completion.
=head2 tcsh
To activate tcsh completion for this script, put:
complete extract-cpan-modules-from-html 'p/*/`extract-cpan-modules-from-html`/'
in your tcsh startup (e.g. C<~/.tcshrc>). Your next shell session will then
recognize tab completion for the command. Or, you can also directly execute the
line above in your shell to activate immediately.
It is also recommended to install C<shcompgen> (see above).
=head2 other shells
( run in 1.262 second using v1.01-cache-2.11-cpan-13bb782fe5a )