NAME

MyCPAN::App::DPAN::SVNPostFlight - A No-op reports processor

SYNOPSIS

Use this from dpan by specifying it as the postflight_class class:

# in dpan.conf
postflight_class  MyCPAN::App::DPAN::SVNPostFlight
postflight_dry_run 1

DESCRIPTION

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)!

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.

At the end of the run, this prints the URL you need to use to access the repository.

Logging

This module uses the PostFlight logging category in the Log::Log4perl setup.

Writing your own

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.

Methods

svn

Returns the path to the svn binary.

dry_run

Returns the value of the postflight_dry_run configuration directive.

run_svn

Runs an svn command. During a dry run it merely prints the command to standard output. Otherwise, it actually runs the svn command.

run( $application )

Makes the hamsters go. This is called automatically from dpan. It gets the application object as its argument.

SEE ALSO

MyCPAN::App::DPAN, dpan

SOURCE AVAILABILITY

This code is in Github:

git://github.com/briandfoy/mycpan-app-dpan.git

AUTHOR

brian d foy, <bdfoy@cpan.org>

COPYRIGHT AND LICENSE

Copyright © 2010-2018, brian d foy <bdfoy@cpan.org>. All rights reserved.

You may redistribute this under the terms of the Artistic License 2.0.