]> git.vpit.fr Git - perl/modules/rgit.git/blob - lib/App/Rgit/Utils.pm
Get rid of validate()
[perl/modules/rgit.git] / lib / App / Rgit / Utils.pm
1 package App::Rgit::Utils;
2
3 use strict;
4 use warnings;
5
6 use Carp qw/croak/;
7
8 =head1 NAME
9
10 App::Rgit::Utils - Miscellaneous utilities for App::Rgit classes.
11
12 =head1 VERSION
13
14 Version 0.06
15
16 =cut
17
18 our $VERSION = '0.06';
19
20 =head1 DESCRIPTION
21
22 Miscellaneous utilities for L<App::Rgit> classes.
23
24 This is an internal module to L<rgit>.
25
26 =head1 CONSTANTS
27
28 =head2 C<NEXT>, C<REDO>, C<LAST>, C<SAVE>
29
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.
31
32 =cut
33
34 use constant {
35  SAVE => 0x1,
36  NEXT => 0x2,
37  REDO => 0x4,
38  LAST => 0x8,
39 };
40
41 =head2 C<DIAG>, C<INFO>, C<WARN>, C<ERR> and C<CRIT>
42
43 Message levels.
44
45 =cut
46
47 use constant {
48  INFO => 3,
49  WARN => 2,
50  ERR  => 1,
51  CRIT => 0,
52 };
53
54 =head1 EXPORT
55
56 C<NEXT> C<REDO>, C<LAST> and C<SAVE> are only exported on request, either by their name or by the C<'codes'> tags.
57
58 C<INFO>, C<WARN>, C<ERR> and C<CRIT> are only exported on request, either by their name or by the C<'levels'> tags.
59
60 =cut
61
62 use base qw/Exporter/;
63
64 our @EXPORT         = ();
65 our %EXPORT_TAGS    = (
66  codes  => [ qw/SAVE NEXT REDO LAST/ ],
67  levels => [ qw/INFO WARN ERR CRIT/ ],
68 );
69 our @EXPORT_OK      = map { @$_ } values %EXPORT_TAGS;
70 $EXPORT_TAGS{'all'} = [ @EXPORT_OK ];
71
72 =head1 SEE ALSO
73
74 L<rgit>.
75
76 =head1 AUTHOR
77
78 Vincent Pit, C<< <perl at profvince.com> >>, L<http://profvince.com>.
79
80 You can contact me by mail or on C<irc.perl.org> (vincent).
81
82 =head1 BUGS
83
84 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.
85
86 =head1 SUPPORT
87
88 You can find documentation for this module with the perldoc command.
89
90     perldoc App::Rgit::Utils
91
92 =head1 COPYRIGHT & LICENSE
93
94 Copyright 2008-2009 Vincent Pit, all rights reserved.
95
96 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
97
98 =cut
99
100 1; # End of App::Rgit::Utils