CatalystX::VCS::Lookup - Extract VCS revision of application code
Version 0.01
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 } ); }
You can customize config key for storing revision identificator. Default key is 'revision'.
__PACKAGE__->config( 'VCS::Lookup' => { Revision => 'version' } );
Oleg A. Mamontov, <lonerr at cpan.org>
<lonerr at cpan.org>
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.
bug-catalystx-vcs-lookup at rt.cpan.org
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
http://annocpan.org/dist/CatalystX-VCS-Lookup
CPAN Ratings
http://cpanratings.perl.org/d/CatalystX-VCS-Lookup
Search CPAN
http://search.cpan.org/dist/CatalystX-VCS-Lookup/
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.
To install CatalystX::VCS::Lookup, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CatalystX::VCS::Lookup
CPAN shell
perl -MCPAN -e shell install CatalystX::VCS::Lookup
For more information on module installation, please visit the detailed CPAN module installation guide.