use strict;
use warnings;
-use Cwd (); # cwd, abs_path
+use Cwd (); # cwd
use File::Spec (); # canonpath, catdir, splitdir, abs2rel
use POSIX (); # WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG SIGINT SIGQUIT
+use App::Rgit::Utils (); # abs_path
+
my ($WIFEXITED, $WEXITSTATUS, $WIFSIGNALED, $WTERMSIG);
BEGIN {
=head1 VERSION
-Version 0.06
+Version 0.08
=cut
-our $VERSION = '0.06';
+our $VERSION = '0.08';
=head1 DESCRIPTION
=head1 METHODS
-=head2 C<< new dir => $dir [, fake => 1 ] >>
+=head2 C<new>
+
+ my $arr = App::Rgit::Repository->new(
+ dir => $dir,
+ fake => $bool,
+ );
Creates a new repository starting from C<$dir>.
If the C<fake> option is passed, C<$dir> isn't checked to be a valid C<git> repository.
my $dir = $args{dir};
if (defined $dir) {
- $dir = Cwd::abs_path($dir);
+ $dir = App::Rgit::Utils::abs_path($dir);
} else {
$dir = Cwd::cwd;
}
return 1;
}
-=head2 C<run $conf, @args>
+=head2 C<run>
+
+ my $code = $arr->run($conf, @args);
Runs C<git @args> on the repository for the L<App::Rgit::Config> configuration C<$conf>.
When the repository isn't fake, the format substitutions applies to C<@args> elements.
if ($WIFSIGNALED->($?)) {
$sig = $WTERMSIG->($?);
$conf->warn("git died with signal $sig\n");
- if ($sig == POSIX::SIGINT || $sig == POSIX::SIGQUIT) {
+ if ($sig == POSIX::SIGINT() || $sig == POSIX::SIGQUIT()) {
$conf->err("Aborting\n");
exit $sig;
}
=head1 BUGS
-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.
+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.
=head1 SUPPORT