X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Frgit.git;a=blobdiff_plain;f=lib%2FApp%2FRgit%2FRepository.pm;fp=lib%2FApp%2FRgit%2FRepository.pm;h=1d8d490c16ea6c6e84db0ade55e760612fa1bcbe;hp=fd19bab29210aafb9a0a518d845b1d782e047627;hb=1c5bf56c6f80e4cd818c341b34ba3410f34ed514;hpb=caf4ff14ac06ea364ea51f725d041fd715e9682f diff --git a/lib/App/Rgit/Repository.pm b/lib/App/Rgit/Repository.pm index fd19bab..1d8d490 100644 --- a/lib/App/Rgit/Repository.pm +++ b/lib/App/Rgit/Repository.pm @@ -14,8 +14,6 @@ BEGIN { *WIFSIGNALED = sub { shift() & 127 } unless eval { WIFSIGNALED(0); 1 }; } -use App::Rgit::Utils qw/validate/; - =head1 NAME App::Rgit::Repository - Class representing a Git repository. @@ -44,10 +42,15 @@ If the C option is passed, C<$dir> isn't checked to be a valid C repo =cut sub new { - my ($class, %args) = &validate; + my $class = shift; + $class = ref $class || $class; + + my %args = @_; + my $dir = $args{dir}; $dir = abs_path $dir if defined $dir and not file_name_is_absolute $dir; $dir = cwd unless defined $dir; + my ($repo, $bare, $name, $work); if ($args{fake}) { $repo = $work = $dir; @@ -77,6 +80,7 @@ sub new { $work = $repo; } } + bless { fake => !!$args{fake}, repo => $repo,