DPAN/NullPostFlight.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 19 CC 1 SCAR 6.9
CC
1
Cov
0%
run
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package MyCPAN::App::DPAN::NullPostFlight;
2 use strict;
3 use warnings;
4 use utf8;
5  
6 =encoding utf8
7  
8 =head1 NAME
9  
10 MyCPAN::App::DPAN::SVNPostFlight - A No-op postflight class
11  
12 =head1 SYNOPSIS
13  
14 Use this from C<dpan> by specifying it as the C<postflight_class> class:
15  
16 # in dpan.conf
17 postflight_class MyCPAN::App::DPAN::NullPostFlight
18  
19 =head1 DESCRIPTION
20  
21 This class is an example for a user-defined class to run at the end of
22 C<dpan>'s normal processing. The class only needs to provide a C<run>
23 method, which is automatically called by C<dpan>. Be careful that you
24 don't import anything called C<run> (looking at you, C<IPC::Run>)!
25  
26 This example merely prints a message to show you that it ran. You might
27 want to use this class while you're trying to work out your process
28 but you don't want to do any post flight processing just yet.
29  
30 =head2 Logging
31  
32 This module has no logging.
33  
34 =head2 Writing your own
35  
36 If you want to maek your own class, check out the source for C<run>. The
37 code comments explain what you should be doing. After that it's up to you
38 to figure out what to do.
39  
40 =head2 Methods
41  
42 =over 4
43  
44 =item run
45  
46 C<dpan> calls this method automtically.
47  
48 =cut
49  
50 sub run
51 {
52 # dpan calls this as a class method after it runs
53 # $application->cleanup. All of dpan's work is done and it's removed
54 # most of its mess. You're picking up control just before it would
55 # normally exit.
56 #
57 # The only argument is the $application object.
58 my( $class, $application ) = @_;
59  
60 # The coordinator object has references to all of the other components
61 # and the application notes. See MyCPAN::Indexer::Tutorial and
62 # MyCPAN::Indexer::Coordinator for more information
63 my $coordinator = $application->get_coordinator;
64  
65 # The Coordinator knows how to get the configuration object
66 my $config = $coordinator->get_config;
67  
68 print "I'm the null postflight class and I'm done before I start!\n";
69  
70 return 1;
71 }
72  
73 =back
74  
75 =head1 SEE ALSO
76  
77 MyCPAN::App::DPAN, dpan
78  
79 =head1 SOURCE AVAILABILITY
80  
81 This code is in Github:
82  
83 git://github.com/briandfoy/mycpan-app-dpan.git
84  
85 =head1 AUTHOR
86  
87 brian d foy, C<< <bdfoy@cpan.org> >>
88  
89 =head1 COPYRIGHT AND LICENSE
90  
91 Copyright © 2010-2018, brian d foy <bdfoy@cpan.org>. All rights reserved.
92  
93 You may redistribute this under the terms of the Artistic License 2.0.
94  
95 =cut
96  
97 1;