-
-
08 Jan 2022 22:09:24 UTC
- Distribution: Module-Extract-DeclaredMinimumPerl
- Module version: 1.023
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (0)
- Testers (321 / 0 / 1)
- Kwalitee
Bus factor: 1- 93.18% Coverage
- License: artistic_2
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (10.54KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- PPI
- Test::More
- Test::Output
- feature
- version
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
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_minimum_declared_perl
.
TO DO
Make it recursive, so it scans the source for any module that it finds.
SEE ALSO
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-2022, brian d foy <bdfoy@cpan.org>. All rights reserved.
You may redistribute this under the terms of the Artistic License 2.0.
Module Install Instructions
To install Module::Extract::DeclaredMinimumPerl, copy and paste the appropriate command in to your terminal.
cpanm Module::Extract::DeclaredMinimumPerl
perl -MCPAN -e shell install Module::Extract::DeclaredMinimumPerl
For more information on module installation, please visit the detailed CPAN module installation guide.