line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
15
|
|
|
15
|
|
9265
|
use strict; |
|
15
|
|
|
|
|
29
|
|
|
15
|
|
|
|
|
492
|
|
2
|
15
|
|
|
15
|
|
79
|
use warnings; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
709
|
|
3
|
|
|
|
|
|
|
package MetaCPAN::API::Module; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
$MetaCPAN::API::Module::VERSION = '0.44'; |
6
|
15
|
|
|
15
|
|
73
|
use Carp; |
|
15
|
|
|
|
|
31
|
|
|
15
|
|
|
|
|
1143
|
|
7
|
15
|
|
|
15
|
|
102
|
use Any::Moose 'Role'; |
|
15
|
|
|
|
|
39
|
|
|
15
|
|
|
|
|
121
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub module { |
11
|
2
|
|
|
2
|
1
|
2159
|
my $self = shift; |
12
|
2
|
|
|
|
|
4
|
my $name = shift; |
13
|
|
|
|
|
|
|
|
14
|
2
|
100
|
|
|
|
195
|
$name or croak 'Please provide a module name'; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
|
|
8
|
return $self->fetch("module/$name"); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
1; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
__END__ |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=pod |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
MetaCPAN::API::Module - Module information for MetaCPAN::API |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 VERSION |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
version 0.44 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 DESCRIPTION |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
This role provides MetaCPAN::API with fetching information about modules. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
More specifically, this returns the C<.pm> file of that module. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 METHODS |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head2 module |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
my $result = $mcpan->module('MetaCPAN::API'); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Searches MetaCPAN and returns a module's C<.pm> file. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 file |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
This used to be a synonym of C<module>, but the functionality has now |
50
|
|
|
|
|
|
|
moved to L<MetaCPAN::API::File>. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 AUTHOR |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Sawyer X <xsawyerx@cpan.org> |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
This software is copyright (c) 2011 by Sawyer X. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
61
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=cut |
64
|
|
|
|
|
|
|
|