line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
22
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
89
|
|
2
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
130
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Perl::PrereqScanner::Scanner 1.100; |
5
|
|
|
|
|
|
|
# ABSTRACT: something that scans for prereqs in a Perl document |
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
1364
|
use Moo::Role; |
|
3
|
|
|
|
|
25046
|
|
|
3
|
|
|
|
|
17
|
|
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 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 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
|
|
828
|
my ($self, $token) = @_; |
31
|
387
|
|
|
|
|
569
|
my @contents; |
32
|
387
|
100
|
100
|
|
|
2029
|
if ( $token->isa('PPI::Token::QuoteLike::Words') || $token->isa('PPI::Token::Number') ) { |
33
|
57
|
|
|
|
|
175
|
@contents = $token->literal; |
34
|
|
|
|
|
|
|
} else { |
35
|
330
|
|
|
|
|
920
|
@contents = $token->string; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
387
|
|
|
|
|
4525
|
return @contents; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |