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.07
+Version 0.08
=cut
-our $VERSION = '0.07';
+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.
=cut
BEGIN {
- eval "sub $_ { \$_[0]->{$_} }" for qw/fake repo bare name work/;
+ eval "sub $_ { \$_[0]->{$_} }" for qw<fake repo bare name work>;
}
=head1 SEE ALSO