line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Version; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:XSAWYERX'; |
3
|
|
|
|
|
|
|
# ABSTRACT: Get module versions |
4
|
|
|
|
|
|
|
$Module::Version::VERSION = '0.13'; |
5
|
3
|
|
|
3
|
|
70166
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
96
|
|
6
|
3
|
|
|
3
|
|
14
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
89
|
|
7
|
3
|
|
|
3
|
|
1482
|
use parent 'Exporter'; |
|
3
|
|
|
|
|
881
|
|
|
3
|
|
|
|
|
19
|
|
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
180
|
use Carp qw< croak >; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
151
|
|
10
|
3
|
|
|
3
|
|
2497
|
use ExtUtils::MakeMaker; |
|
3
|
|
|
|
|
333619
|
|
|
3
|
|
|
|
|
623
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our @EXPORT_OK = 'get_version'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub get_version { |
15
|
3
|
100
|
|
3
|
1
|
2456
|
my $module = shift or croak 'Must get a module name'; |
16
|
2
|
|
|
|
|
24
|
my $file = MM->_installed_file_for_module($module); |
17
|
|
|
|
|
|
|
|
18
|
2
|
100
|
|
|
|
468
|
$file || return; |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
12
|
return MM->parse_version($file); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |