]> 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 1e822b4b0f2856ac561547fd29e13ecce91545f7..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;
@@ -125,7 +128,7 @@ L<rgit>.
 =head1 AUTHOR
 
 Vincent Pit, C<< <perl at profvince.com> >>, L<http://profvince.com>.
-   
+
 You can contact me by mail or on C<irc.perl.org> (vincent).
 
 =head1 BUGS