]> git.vpit.fr Git - perl/modules/rgit.git/blobdiff - lib/App/Rgit.pm
Bump copyright year
[perl/modules/rgit.git] / lib / App / Rgit.pm
index f84d445b74b977839fc7db74660c1c1f28d0594b..91999e2b4ee565f4da283f5906b5ce18ca709632 100644 (file)
@@ -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;
@@ -18,11 +15,11 @@ App::Rgit - Backend that supports the rgit utility.
 
 =head1 VERSION
 
-Version 0.01
+Version 0.05
 
 =cut
 
-our $VERSION = '0.01';
+our $VERSION = '0.05';
 
 =head1 DESCRIPTION
 
@@ -40,21 +37,21 @@ Creates a new L<App::Rgit> 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,
-  git  => $args{git},
+  root  => $args{root},
+  git   => $args{git},
+  debug => $args{debug},
+ );
+ return unless defined $config;
+ my $command = App::Rgit::Command->new(
+  cmd    => $args{cmd},
+  args   => $args{args},
+  policy => $args{policy},
  );
+ 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,
  );
 }
 
@@ -97,7 +94,7 @@ You can find documentation for this module with the perldoc command.
 
 =head1 COPYRIGHT & LICENSE
 
-Copyright 2008 Vincent Pit, all rights reserved.
+Copyright 2008-2009 Vincent Pit, all rights reserved.
 
 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.