line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MyCPAN::Indexer::Collator::Null; |
2
|
1
|
|
|
1
|
|
1073
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
5
|
use parent qw(MyCPAN::Indexer::Component); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
6
|
1
|
|
|
1
|
|
42
|
use vars qw($VERSION $logger); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
7
|
|
|
|
|
|
|
$VERSION = '1.28_12'; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
5
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
83
|
|
10
|
1
|
|
|
1
|
|
5
|
use File::Basename; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
71
|
|
11
|
1
|
|
|
1
|
|
5
|
use File::Spec::Functions qw(catfile); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
12
|
1
|
|
|
1
|
|
4
|
use Log::Log4perl; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
13
|
1
|
|
|
1
|
|
34
|
use YAML; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
73
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
BEGIN { |
16
|
1
|
|
|
1
|
|
4
|
$logger = Log::Log4perl->get_logger( 'Collator' ); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 NAME |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
MyCPAN::Indexer::Collator::Null - A No-op reports processor |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 SYNOPSIS |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Use this in backpan_indexer.pl by specifying it as the reporter class: |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# in backpan_indexer.config |
28
|
|
|
|
|
|
|
collator_class MyCPAN::Indexer::Collator::Null |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 DESCRIPTION |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
This class is a stand in for a Collator that does something real. In the |
33
|
|
|
|
|
|
|
normal run of a backpan index, there's nothing to create out of the set of |
34
|
|
|
|
|
|
|
reports, so this example does nothing. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head2 Methods |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=over 4 |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=item component_type |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
This is a collator component. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=cut |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
0
|
1
|
|
sub component_type { $_[0]->collator_type } |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=item get_collator( $Notes ) |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
C sets the C key in the C<$Notes> hash reference. The |
51
|
|
|
|
|
|
|
value is a code reference that takes the information collected about a distribution |
52
|
|
|
|
|
|
|
and dumps it as a YAML file. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
See L for details about what C expects |
55
|
|
|
|
|
|
|
and should do. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub get_collator |
60
|
|
|
|
|
|
|
{ |
61
|
|
|
|
|
|
|
#TRACE( sub { get_caller_info } ); |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
0
|
1
|
|
my( $self ) = @_; |
64
|
|
|
|
|
|
|
|
65
|
0
|
|
|
0
|
|
|
my $collator = sub { 1 }; |
|
0
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
0
|
|
|
|
|
|
$self->set_note( 'collator', $collator ); |
68
|
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
1; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=back |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 TO DO |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 SOURCE AVAILABILITY |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
This code is in Github: |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
git://github.com/briandfoy/mycpan-indexer.git |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 AUTHOR |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
brian d foy, C<< >> |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Copyright (c) 2008-2013, brian d foy, All Rights Reserved. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
You may redistribute this under the same terms as Perl itself. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=cut |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
1; |