NAME
CatalystX::VCS::Lookup - Extract VCS revision of application code
VERSION
Version 0.07
SYNOPSIS
If your application is started from the working copy of version control system, this module allows to get automatically current revision identificator in the application config.
Setup application:
package MyApp;
use Catalyst::Runtime;
use Moose;
extends 'Catalyst';
with 'CatalystX::VCS::Lookup';
1;
Get revision from controller:
sub index : Path Args(0) {
my ( $self,$c ) = @_;
$c->res->body( "Current version:" . $c->config->{ revision } );
}
CONFIGURATION
You can customize config key for storing revision identificator. Default key is 'revision'.
__PACKAGE__->config(
'VCS::Lookup' => { Revision => 'version' }
);
AUTHOR
Oleg A. Mamontov, <lonerr at cpan.org>
BUGS
Please report any bugs or feature requests to bug-catalystx-vcs-lookup at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CatalystX-VCS-Lookup. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc CatalystX::VCS::Lookup
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=CatalystX-VCS-Lookup
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2012 Oleg A. Mamontov.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.