1 package App::Rgit::Utils;
10 App::Rgit::Utils - Miscellanous utilities for App::Rgit classes.
18 our $VERSION = '0.05';
22 Miscellanous utilities for L<App::Rgit> classes.
24 This is an internal module to L<rgit>.
28 =head2 C<NEXT>, C<REDO>, C<LAST>, C<SAVE>
30 Codes to return from the C<report> callback to respectively proceed to the next repository, retry the current one, end it all, and save the return code.
41 =head2 C<DIAG>, C<INFO>, C<WARN>, C<ERR> and C<CRIT>
56 =head2 C<validate @method_args>
58 Sanitize arguments passed to methods.
64 croak 'Optional arguments must be passed as key/value pairs' if @_ % 2;
65 $class = ref($class) || $class;
66 $class = caller unless $class;
72 C<validate> is only exported on request, either by its name or by the C<'funcs'> tag.
74 C<NEXT> C<REDO>, C<LAST> and C<SAVE> are only exported on request, either by their name or by the C<'codes'> tags.
76 C<INFO>, C<WARN>, C<ERR> and C<CRIT> are only exported on request, either by their name or by the C<'levels'> tags.
80 use base qw/Exporter/;
84 funcs => [ qw/validate/ ],
85 codes => [ qw/SAVE NEXT REDO LAST/ ],
86 levels => [ qw/INFO WARN ERR CRIT/ ],
88 our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
89 $EXPORT_TAGS{'all'} = [ @EXPORT_OK ];
97 Vincent Pit, C<< <perl at profvince.com> >>, L<http://profvince.com>.
99 You can contact me by mail or on C<irc.perl.org> (vincent).
103 Please report any bugs or feature requests to C<bug-rgit at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=rgit>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
107 You can find documentation for this module with the perldoc command.
109 perldoc App::Rgit::Utils
111 =head1 COPYRIGHT & LICENSE
113 Copyright 2008 Vincent Pit, all rights reserved.
115 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
119 1; # End of App::Rgit::Utils