]> git.vpit.fr Git - perl/modules/rgit.git/blob - lib/App/Rgit/Command/Each.pm
155e9744ac37ffa1417b22537f3e294072c1f44c
[perl/modules/rgit.git] / lib / App / Rgit / Command / Each.pm
1 package App::Rgit::Command::Each;
2
3 use strict;
4 use warnings;
5
6 use base qw/App::Rgit::Command/;
7
8 =head1 NAME
9
10 App::Rgit::Command::Each - Class for commands to execute for each repository.
11
12 =head1 VERSION
13
14 Version 0.02
15
16 =cut
17
18 our $VERSION = '0.02';
19
20 =head1 DESCRIPTION
21
22 Class for commands to execute for each repository.
23
24 This is an internal class to L<rgit>.
25
26 =head1 METHODS
27
28 This class inherits from L<App::Rgit::Command>.
29
30 It implements :
31
32 =head2 C<run>
33
34 =cut
35
36 sub run {
37  my $self = shift;
38  my $status = 0;
39  for (@{$self->repos}) {
40   $_->chdir or next;
41   $status = $_->run($_[0], @{$self->args});
42   last if $status;
43  }
44  $self->cwd_as_repo->chdir;
45  return $status;
46 }
47
48 =head1 SEE ALSO
49
50 L<rgit>.
51
52 =head1 AUTHOR
53
54 Vincent Pit, C<< <perl at profvince.com> >>, L<http://profvince.com>.
55
56 You can contact me by mail or on C<irc.perl.org> (vincent).
57
58 =head1 BUGS
59
60 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.
61
62 =head1 SUPPORT
63
64 You can find documentation for this module with the perldoc command.
65
66     perldoc App::Rgit::Command::Each
67
68 =head1 COPYRIGHT & LICENSE
69
70 Copyright 2008 Vincent Pit, all rights reserved.
71
72 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
73
74 =cut
75
76 1; # End of App::Rgit::Command::Each