| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
3
|
|
|
3
|
|
19
|
use strict; |
|
|
3
|
|
|
|
|
5
|
|
|
|
3
|
|
|
|
|
78
|
|
|
2
|
3
|
|
|
3
|
|
13
|
use warnings; |
|
|
3
|
|
|
|
|
6
|
|
|
|
3
|
|
|
|
|
105
|
|
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Perl::PrereqScanner::Scanner 1.025; |
|
5
|
|
|
|
|
|
|
# ABSTRACT: something that scans for prereqs in a Perl document |
|
6
|
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
1127
|
use Moose::Role; |
|
|
3
|
|
|
|
|
12147
|
|
|
|
3
|
|
|
|
|
9
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#pod =head1 DESCRIPTION |
|
10
|
|
|
|
|
|
|
#pod |
|
11
|
|
|
|
|
|
|
#pod This is a role to be composed into classes that will act as scanners plugged |
|
12
|
|
|
|
|
|
|
#pod into a Perl::PrereqScanner object. |
|
13
|
|
|
|
|
|
|
#pod |
|
14
|
|
|
|
|
|
|
#pod These classes must provide a C<scan_for_prereqs> method, which will be called |
|
15
|
|
|
|
|
|
|
#pod like this: |
|
16
|
|
|
|
|
|
|
#pod |
|
17
|
|
|
|
|
|
|
#pod $scanner->scan_for_prereqs($ppi_doc, $version_requirements); |
|
18
|
|
|
|
|
|
|
#pod |
|
19
|
|
|
|
|
|
|
#pod The scanner should alter the L<CPAN::Meta::Requirements> object to reflect |
|
20
|
|
|
|
|
|
|
#pod its findings about the PPI document. |
|
21
|
|
|
|
|
|
|
#pod |
|
22
|
|
|
|
|
|
|
#pod =cut |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
requires 'scan_for_prereqs'; |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# DO NOT RELY ON THIS EXISTING OUTSIDE OF CORE! |
|
27
|
|
|
|
|
|
|
# THIS MIGHT GO AWAY WITHOUT NOTICE! |
|
28
|
|
|
|
|
|
|
# -- rjbs, 2010-04-06 |
|
29
|
|
|
|
|
|
|
sub _q_contents { |
|
30
|
387
|
|
|
387
|
|
635
|
my ($self, $token) = @_; |
|
31
|
387
|
|
|
|
|
472
|
my @contents; |
|
32
|
387
|
100
|
100
|
|
|
1910
|
if ( $token->isa('PPI::Token::QuoteLike::Words') || $token->isa('PPI::Token::Number') ) { |
|
33
|
57
|
|
|
|
|
185
|
@contents = $token->literal; |
|
34
|
|
|
|
|
|
|
} else { |
|
35
|
330
|
|
|
|
|
1065
|
@contents = $token->string; |
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
|
|
38
|
387
|
|
|
|
|
3756
|
return @contents; |
|
39
|
|
|
|
|
|
|
} |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=pod |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=encoding UTF-8 |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 NAME |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Perl::PrereqScanner::Scanner - something that scans for prereqs in a Perl document |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 VERSION |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
version 1.025 |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
This is a role to be composed into classes that will act as scanners plugged |
|
60
|
|
|
|
|
|
|
into a Perl::PrereqScanner object. |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
These classes must provide a C<scan_for_prereqs> method, which will be called |
|
63
|
|
|
|
|
|
|
like this: |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
$scanner->scan_for_prereqs($ppi_doc, $version_requirements); |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
The scanner should alter the L<CPAN::Meta::Requirements> object to reflect |
|
68
|
|
|
|
|
|
|
its findings about the PPI document. |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 PERL VERSION |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
This library should run on perls released even a long time ago. It should work |
|
73
|
|
|
|
|
|
|
on any version of perl released in the last five years. |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Although it may work on older versions of perl, no guarantee is made that the |
|
76
|
|
|
|
|
|
|
minimum required version will not be increased. The version may be increased |
|
77
|
|
|
|
|
|
|
for any reason, and there is no promise that patches will be accepted to lower |
|
78
|
|
|
|
|
|
|
the minimum required perl. |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 AUTHORS |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=over 4 |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=item * |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Jerome Quelin |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item * |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Ricardo Signes <cpan@semiotic.systems> |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=back |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This software is copyright (c) 2009 by Jerome Quelin. |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
99
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=cut |