use strict;
use warnings;
-use Cwd qw/abs_path/;
-use File::Spec::Functions qw/file_name_is_absolute/;
-
use Object::Tiny qw/config command/;
use App::Rgit::Command;
=head1 VERSION
-Version 0.01
+Version 0.03
=cut
-our $VERSION = '0.01';
+our $VERSION = '0.03';
=head1 DESCRIPTION
sub new {
my ($class, %args) = &validate;
- my $root = $args{root};
- return unless defined $root and -d $root;
- $root = abs_path $root unless file_name_is_absolute $root;
- return unless defined $args{git} and -x $args{git};
my $config = App::Rgit::Config->new(
- root => $root,
+ root => $args{root},
git => $args{git},
);
+ return unless defined $config;
+ my $command = App::Rgit::Command->new(
+ cmd => $args{cmd},
+ args => $args{args},
+ );
+ return unless defined $command;
$class->SUPER::new(
config => $config,
- command => App::Rgit::Command->new(
- cmd => $args{cmd},
- args => $args{args},
- repos => $config->repos,
- )
+ command => $command,
);
}