Perl::PrereqScanner::Scanner::Hint - Plugin for Perl::PrereqScanner looking for ## REQUIRE: comments
Perl::PrereqScanner
## REQUIRE:
Version v0.1.1, released on 2016-12-28 20:18 UTC.
Perl::PrereqScanner::Scanner::Hint (or just Scanner::Hint for brevity) is a plugin for Perl::PrereqScanner tool. Scanner::Hint looks for # REQUIRE: ModuleName VersionRange comments in the code.
Perl::PrereqScanner::Scanner::Hint
Scanner::Hint
# REQUIRE: ModuleName VersionRange
This is Perl::PrereqScanner::Scanner::Hint module documentation. Read this if you are going to hack or extend Manifest::Write.
Manifest::Write
If you want to specify implicit prerequisites directly in Perl code, read the user manual. General topics like getting source, building, installing, bug reporting and some others are covered in the README.
use Perl::PrereqScanner; my $scanner = Perl::PrereqScanner->new( { extra_scanners => [ qw{ Hint } ], } ); my $prereqs = $scanner->scan_file( $path );
This is a trivial scanner which utilizes power of Perl::PrereqScanner and PPI.
PPI
my $doc = PPI::Document->new( ... ); my $req = CPAN::Meta::Requirements->new; $self->scan_for_prereqs( $doc, $req );
The method scans document $doc, which is expected to be an objects of PPI::Document class. The methods looks for comments starting with # REQUIRE:, and adds found requirements to $req, by calling $req->add_string+requirement. $req is expected to be an object of CPAN::Meta::Requirements class.
$doc
PPI::Document
# REQUIRE:
$req
$req->add_string+requirement
CPAN::Meta::Requirements
Van de Bugger <van.de.bugger@gmail.com>
Copyright (C) 2015, 2016 Van de Bugger
License GPLv3+: The GNU General Public License version 3 or later <http://www.gnu.org/licenses/gpl-3.0.txt>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
To install Perl::PrereqScanner::Scanner::Hint, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::PrereqScanner::Scanner::Hint
CPAN shell
perl -MCPAN -e shell install Perl::PrereqScanner::Scanner::Hint
For more information on module installation, please visit the detailed CPAN module installation guide.