]> git.vpit.fr Git - perl/modules/rgit.git/blobdiff - lib/App/Rgit/Config.pm
Get rid of validate()
[perl/modules/rgit.git] / lib / App / Rgit / Config.pm
index 76a605085b6fc0a8777fde3669abe033505c18f2..1cac51d6a75854b7c2e8c9c78f216ec717d09106 100644 (file)
@@ -8,7 +8,7 @@ use Cwd qw/abs_path/;
 use File::Spec::Functions qw/file_name_is_absolute/;
 
 use App::Rgit::Repository;
-use App::Rgit::Utils qw/validate :levels/;
+use App::Rgit::Utils qw/:levels/;
 
 use constant IS_WIN32 => $^O eq 'MSWin32';
 
@@ -39,7 +39,10 @@ Creates a new configuration object based on the root directory C<$root> and usin
 =cut
 
 sub new {
- my ($class, %args) = &validate;
+ my $class = shift;
+ $class = ref $class || $class;
+
+ my %args = @_;
 
  my $root = $args{root};
  return unless defined $root and -d $root;