View on
MetaCPAN
search.cpan.org is shutting down
For details read Perl NOC. After June 25th this page will redirect to MetaCPAN.org
brian d foy > Module-Extract-DeclaredMinimumPerl > Module::Extract::DeclaredMinimumPerl

Download:
Module-Extract-DeclaredMinimumPerl-1.021.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 1.021   Source  

NAME ^

Module::Extract::DeclaredMinimumPerl - Extract the version of Perl a module declares

SYNOPSIS ^

        use Module::Extract::DeclaredMinimumPerl;

        my $extor = Module::Extract::DeclaredMinimumPerl->new;

        my $version = $extor->get_minimum_declared_perl( $file );
        if( $extor->error ) { ... }

DESCRIPTION ^

Extract the largest declared Perl version and returns it as a version object. For instance, in a script you might have:

  use v5.16;

This module will extract that v5.16 and return it.

This module tries to handle any format that PPI will recognize, passing them through version.pm to normalize them.

new

Makes an object. The object doesn't do anything just yet, but you need it to call the methods.

init

Set up the object. You shouldn't need to call this yourself. You can override it though!

get_minimum_declared_perl( FILE )

Extracts all of the declared minimum versions for Perl, sorts them, and returns the largest a version object.

error

Return the error from the last call to get_modules.

TO DO ^

SEE ALSO ^

Module::Extract::Use

SOURCE AVAILABILITY ^

The source code is in Github:

        https://github.com/briandfoy/module-extract-declaredminimumperl

AUTHOR ^

brian d foy, <bdfoy@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright © 2011-2018, brian d foy <bdfoy@cpan.org>. All rights reserved.

You may redistribute this under the terms of the Artistic License 2.0.

syntax highlighting: