use strict;
use warnings;
-use Carp qw/croak/;
+use Carp ();
use App::Rgit::Utils qw/:codes/;
if ($class eq __PACKAGE__) {
$class = $action;
} else {
- croak "Command $cmd should be executed as a $action"
- unless $class->isa($action);
+ Carp::confess("Command $cmd should be executed as a $action")
+ unless $class->isa($action);
}
- eval "require $action; 1" or croak "Couldn't load $action: $@";
+ eval "require $action; 1" or Carp::confess("Couldn't load $action: $@");
+
bless {
cmd => $cmd,
args => $args{args} || [ ],
use strict;
use warnings;
-use Carp qw/croak/;
+use Carp ();
use Cwd qw/abs_path/;
use File::Spec::Functions qw/file_name_is_absolute/;
}
my $conf = 'App::Rgit::Config::Default';
- eval "require $conf; 1" or croak "Couldn't load $conf: $@";
+ eval "require $conf; 1" or Carp::confess("Couldn't load $conf: $@");
my $r = App::Rgit::Repository->new(fake => 1);
return unless defined $r;