NAME
Perl::PrereqScanner::Scanner::Hint - Plugin for Perl::PrereqScanner
looking for # REQUIRE:
comments
VERSION
Version v0.1.0, released on 2015-10-22 11:14 UTC.
WHAT?
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.
This is Perl::PrereqScanner::Scanner::Hint
module documentation. Read this if you are going to hack or extend Manifest::Write
.
If you want to specify implicit prerequisites directly in your Perl code, read the user manual. General topics like getting source, building, installing, bug reporting and some others are covered in the README.
SYNOPSIS
use Perl::PrereqScanner;
my $scanner = Perl::PrereqScanner->new( {
extra_scanners => [ qw{ Hint } ],
} );
my $prereqs = $scanner->scan_file( $path );
DESCRIPTION
This is a trivial scanner which utilizes power of Perl::PrereqScanner
and PPI
.
OBJECT METHODS
scan_for_prereqs
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.
SEE ALSO
AUTHOR
Van de Bugger <van.de.bugger@gmail.com>
COPYRIGHT AND LICENSE
Copyright © 2015 Van de Bugger
This file is part of perl-Perl-PrereqScanner-Scanner-Hint.
perl-Perl-PrereqScanner-Scanner-Hint is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
perl-Perl-PrereqScanner-Scanner-Hint is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with perl-Perl-PrereqScanner-Scanner-Hint. If not, see <http://www.gnu.org/licenses/>.