'autodie' =>
{
'MAINTAINER' => 'pjf',
- 'DISTRIBUTION' => 'PJF/autodie-2.06.tar.gz',
+ 'DISTRIBUTION' => 'PJF/autodie-2.06_01.tar.gz',
'FILES' => q[lib/Fatal.pm lib/autodie.pm lib/autodie],
'EXCLUDED' => [ qr{^inc/Module/},
use constant MIN_IPC_SYS_SIMPLE_VER => 0.12;
# All the Fatal/autodie modules share the same version number.
-our $VERSION = '2.06';
+our $VERSION = '2.06_01';
our $Debug ||= 0;
':2.04' => [qw(:default)],
':2.05' => [qw(:default)],
':2.06' => [qw(:default)],
+ ':2.06_01' => [qw(:default)],
);
$TAGS{':all'} = [ keys %TAGS ];
function => q{$human_sub_name}, args => [ @argv ],
pragma => q{$class}, errno => \$!,
context => \$context, return => \$retval,
+ eval_error => \$@
)
};
our $VERSION;
BEGIN {
- $VERSION = '2.06';
+ $VERSION = '2.06_01';
}
use constant ERROR_WRONG_FATAL => q{
use if ($] >= 5.010), overload => '~~' => "matches";
-our $VERSION = '2.06';
+our $VERSION = '2.06_01';
my $PACKAGE = __PACKAGE__; # Useful to have a scalar for hash keys.
sub errno { return $_[0]->{$PACKAGE}{errno}; }
+=head3 eval_error
+
+ my $old_eval_error = $E->eval_error;
+
+The contents of C<$@> immediately after autodie triggered an
+exception. This may be useful when dealing with modules such
+as L<Text::Balanced> that set (but do not throw) C<$@> on error.
+
+=cut
+
+sub eval_error { return $_[0]->{$PACKAGE}{eval_error}; }
+
=head3 matches
if ( $e->matches('open') ) { ... }
$this->{$PACKAGE}{context} = $args{context};
$this->{$PACKAGE}{return} = $args{return};
+ $this->{$PACKAGE}{eval_error} = $args{eval_error};
$this->{$PACKAGE}{args} = $args{args} || [];
$this->{$PACKAGE}{function}= $args{function} or
use base 'autodie::exception';
use Carp qw(croak);
-our $VERSION = '2.06';
+our $VERSION = '2.06_01';
my $PACKAGE = __PACKAGE__;
use constant PERL58 => ( $] < 5.009 );
-our $VERSION = '2.06';
+our $VERSION = '2.06_01';
=head1 NAME