1Module::Extract::VERSIOUNs(e3r)Contributed Perl DocumentMaotdiuolne::Extract::VERSION(3)
2
3
4

NAME

6       Module::Extract::VERSION - Extract a module version without running
7       code
8

SYNOPSIS

10               use Module::Extract::VERSION;
11
12               my $version   # just the version
13                       = Module::Extract::VERSION->parse_version_safely( $file );
14
15               my @version_info # extra info
16                       = Module::Extract::VERSION->parse_version_safely( $file );
17

DESCRIPTION

19       This module lets you pull out of module source code the version number
20       for the module. It assumes that there is only one $VERSION in the file.
21
22   Class methods
23       $class->parse_version_safely( FILE );
24           Given a module file, return the module version. This works just
25           like "mldistwatch" in PAUSE. It looks for the single line that has
26           the $VERSION statement, extracts it, evals it, and returns the
27           result.
28
29           In scalar context, it returns just the version as a string. In list
30           context, it returns the list of:
31
32                   sigil
33                   fully-qualified variable name
34                   version value
35                   file name
36                   line number of $VERSION
37

SOURCE AVAILABILITY

39       This code is in Github:
40
41               git://github.com/briandfoy/module-extract-version.git
42

AUTHOR

44       brian d foy, "<bdfoy@cpan.org>"
45
46       I stole the some of this code from "mldistwatch" in the PAUSE code by
47       Andreas Koenig, but I've moved most of it around.
48
50       Copyright (c) 2008-2011, brian d foy, All Rights Reserved.
51
52       You may redistribute this under the same terms as Perl itself.
53
54
55
56perl v5.12.3                      2011-04-26       Module::Extract::VERSION(3)
Impressum