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