MyCPAN::App::DPAN::SVNPostFlight - A No-op reports processor
Use this from dpan by specifying it as the postflight_class class:
dpan
postflight_class
# in dpan.conf postflight_class MyCPAN::App::DPAN::SVNPostFlight postflight_dry_run 1
This class is an example for a user-defined class to run at the end of dpan's normal processing. The class only needs to provide a run method, which is automatically called by dpan. Be careful that you don't import anything called run (looking at you, IPC::Run)!
run
IPC::Run
This example checks that the DPAN directory is under source control, invokes an svn update, checks the svn status to see what's changes, and creates a list of svn commands to run. It adds any new files it finds and removes any missing miles. If it detects a conflict, it stops the process before anything happens.
If you've set the postflight_dry_run configuration variable, this class merely prints the svn adds and removes that it would run, but it doesn't actually run them. That gives you a chance to see what it would do without doing it.
postflight_dry_run
At the end of the run, this prints the URL you need to use to access the repository.
This module uses the PostFlight logging category in the Log::Log4perl setup.
PostFlight
Log::Log4perl
If you want to maek your own class, check out the source for run. The code comments explain what you should be doing. However, most of the code in this example isn't specific to the post flight processing.
Returns the path to the svn binary.
Returns the value of the postflight_dry_run configuration directive.
Runs an svn command. During a dry run it merely prints the command to standard output. Otherwise, it actually runs the svn command.
Makes the hamsters go. This is called automatically from dpan. It gets the application object as its argument.
MyCPAN::App::DPAN, dpan
This code is in Github:
git://github.com/briandfoy/mycpan--app--indexer.git
brian d foy, <bdfoy@cpan.org>
<bdfoy@cpan.org>
Copyright (c) 2010, brian d foy, All Rights Reserved.
You may redistribute this under the same terms as Perl itself.
To install MyCPAN::App::DPAN, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MyCPAN::App::DPAN
CPAN shell
perl -MCPAN -e shell install MyCPAN::App::DPAN
For more information on module installation, please visit the detailed CPAN module installation guide.