use if ($] >= 5.010), overload => '~~' => "matches";
-our $VERSION = '2.05';
+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