7 use File::Spec::Functions qw/file_name_is_absolute/;
9 use Object::Tiny qw/config command/;
11 use App::Rgit::Command;
12 use App::Rgit::Config;
13 use App::Rgit::Utils qw/validate/;
17 App::Rgit - Backend that supports the rgit utility.
25 our $VERSION = '0.01';
29 Backend that supports the L<rgit> utility.
31 This is an internal class to L<rgit>.
35 =head2 C<< new root => $root, git => $git, cmd => $cmd, args => \@args >>
37 Creates a new L<App::Rgit> object that's bound to execute the command C<$cmd> on all the C<git> repositories inside C<$root> with C<@args> as arguments and C<$git> as C<git> executable.
42 my ($class, %args) = &validate;
43 my $root = $args{root};
44 return unless defined $root and -d $root;
45 $root = abs_path $root unless file_name_is_absolute $root;
46 return unless defined $args{git} and -x $args{git};
47 my $config = App::Rgit::Config->new(
53 command => App::Rgit::Command->new(
54 cmd => $args{cmd} || ' ',
56 repos => $config->repos,
63 Actually run the commands.
69 $self->command->run($self->config);
84 Vincent Pit, C<< <perl at profvince.com> >>, L<http://profvince.com>.
86 You can contact me by mail or on C<irc.perl.org> (vincent).
90 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.
94 You can find documentation for this module with the perldoc command.
98 =head1 COPYRIGHT & LICENSE
100 Copyright 2008 Vincent Pit, all rights reserved.
102 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
106 1; # End of App::Rgit