X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Frgit.git;a=blobdiff_plain;f=lib%2FApp%2FRgit.pm;h=3d244a1bff509f805f1efd91d30c7264c368080f;hp=d2fe602f4c6b41814da2f57792d7d80e7431f7f9;hb=f5feb13a168183b64735058599b7fbc7c668fc43;hpb=2e22285568ea8e99ddd04a0a530cc39371f57ac7 diff --git a/lib/App/Rgit.pm b/lib/App/Rgit.pm index d2fe602..3d244a1 100644 --- a/lib/App/Rgit.pm +++ b/lib/App/Rgit.pm @@ -3,9 +3,6 @@ package App::Rgit; 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; @@ -40,14 +37,11 @@ Creates a new L object that's bound to execute the command C<$cmd> on 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; $class->SUPER::new( config => $config, command => App::Rgit::Command->new(