line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catalyst::Plugin::Devel::ModuleVersions; |
2
|
|
|
|
|
|
|
our $VERSION = '0.100330'; |
3
|
|
|
|
|
|
|
# ABSTRACT: Dump your loaded module versions to the debug-screen |
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
40177
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
71
|
|
6
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
61
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
1749
|
use MRO::Compat; |
|
2
|
|
|
|
|
16570
|
|
|
2
|
|
|
|
|
83
|
|
9
|
2
|
|
|
2
|
|
24
|
use mro 'c3'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
15
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub dump_these { |
13
|
0
|
|
|
0
|
1
|
|
my $c = shift; |
14
|
|
|
|
|
|
|
|
15
|
0
|
|
|
|
|
|
($c->next::method(@_), [ "Loaded Modules" => |
16
|
|
|
|
|
|
|
[ grep { |
17
|
0
|
|
|
|
|
|
defined $_ |
18
|
|
|
|
|
|
|
} map { |
19
|
0
|
|
|
|
|
|
my $mod = $_; |
20
|
0
|
|
|
|
|
|
$mod =~ s/\.pm$//; |
21
|
0
|
|
|
|
|
|
$mod =~ s/\//::/g; |
22
|
2
|
|
|
2
|
|
247
|
my $version = eval {no strict; ${"${mod}::VERSION"} }; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
235
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
23
|
0
|
0
|
0
|
|
|
|
$version && "$version" ne "-1" |
24
|
|
|
|
|
|
|
? $mod . " " . $version |
25
|
|
|
|
|
|
|
: undef |
26
|
|
|
|
|
|
|
} sort keys %INC |
27
|
|
|
|
|
|
|
] |
28
|
|
|
|
|
|
|
]); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |
37
|
|
|
|
|
|
|
=pod |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Catalyst::Plugin::Devel::ModuleVersions - Dump your loaded module versions to the debug-screen |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 VERSION |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
version 0.100330 |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 INTERFACE |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head2 EXTENDED METHODS |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head3 dump_these |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Uses Class::C3 to extend the catalyst dump_these, and add some more information |
54
|
|
|
|
|
|
|
at the end of the debug screen, containing a list of strings that each is |
55
|
|
|
|
|
|
|
"Module::Name VERSION", ala: |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
"Catalyst::Plugin::Devel::ModuleVersions 0.0001" |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 AUTHOR |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Andreas Marienborg <andremar@cpan.org> |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This software is copyright (c) 2010 by Andreas Marienborg. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
68
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=cut |
71
|
|
|
|
|
|
|
|