- SEE ALSO
- SOURCE AVAILABILITY
- COPYRIGHT AND LICENSE
MyCPAN::App::DPAN::SVNPostFlight - A No-op reports processor
Use this from
dpan by specifying it as the
# 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,
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.
This module uses the
PostFlight logging category in the
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.
- run( $application )
Makes the hamsters go. This is called automatically from dpan. It gets the application object as its argument.
This code is in Github:
brian d foy,
Copyright © 2010-2018, brian d foy <firstname.lastname@example.org>. All rights reserved.
You may redistribute this under the terms of the Artistic License 2.0.