]> git.vpit.fr Git - perl/modules/rgit.git/blob - lib/App/Rgit/Command/Each.pm
Don't store the repos in the command, so that no search happen for Once commands
[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 $conf = shift;
39  my $status = 0;
40  for (@{$conf->repos}) {
41   $_->chdir or next;
42   $status = $_->run($conf, @{$self->args});
43   last if $status;
44  }
45  $self->cwd_as_repo->chdir;
46  return $status;
47 }
48
49 =head1 SEE ALSO
50
51 L<rgit>.
52
53 =head1 AUTHOR
54
55 Vincent Pit, C<< <perl at profvince.com> >>, L<http://profvince.com>.
56
57 You can contact me by mail or on C<irc.perl.org> (vincent).
58
59 =head1 BUGS
60
61 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.
62
63 =head1 SUPPORT
64
65 You can find documentation for this module with the perldoc command.
66
67     perldoc App::Rgit::Command::Each
68
69 =head1 COPYRIGHT & LICENSE
70
71 Copyright 2008 Vincent Pit, all rights reserved.
72
73 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
74
75 =cut
76
77 1; # End of App::Rgit::Command::Each