Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Remove unncessary instances of $real_proto #42

Merged
merged 1 commit into from

2 participants

@nthykier
Collaborator

Signed-off-by: Niels Thykier niels@thykier.net

@nthykier nthykier Remove unncessary instances of $real_proto
Signed-off-by: Niels Thykier <niels@thykier.net>
9cf7b1b
@nthykier
Collaborator

Hey, if you are planning on a release soon, perhaps we could pull this minor code clean up in as well?

@pjf
Owner

Yes we can!

@pjf pjf merged commit d043e61 into pjf:master

1 check passed

Details default The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 26, 2013
  1. @nthykier

    Remove unncessary instances of $real_proto

    nthykier authored
    Signed-off-by: Niels Thykier <niels@thykier.net>
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 10 deletions.
  1. +4 −10 lib/Fatal.pm
View
14 lib/Fatal.pm
@@ -1144,7 +1144,7 @@ sub _one_invocation {
sub _make_fatal {
my($class, $sub, $pkg, $void, $lexical, $filename, $insist, $install_subs) = @_;
- my($code, $sref, $real_proto, $proto, $core, $call, $hints, $cache, $cache_type);
+ my($code, $sref, $proto, $core, $call, $hints, $cache, $cache_type);
my $ini = $sub;
my $name = $sub;
@@ -1381,14 +1381,8 @@ sub _make_fatal {
my $installed_sub = $code;
if ($lexical) {
- my $real_proto = '';
- if (defined $proto) {
- $real_proto = " ($proto)";
- } else {
- $proto = '@';
- }
$installed_sub = $class->_make_leak_guard($filename, $code, $sref, $call,
- $pkg, $proto, $real_proto);
+ $pkg, $proto);
}
$cache->{$cache_type} = $code;
@@ -1456,7 +1450,7 @@ sub exception_class { return "autodie::exception" };
# Creates and returns a leak guard (with prototype if needed).
sub _make_leak_guard {
- my ($class, $filename, $wrapped_sub, $orig_sub, $call, $pkg, $proto, $real_proto) = @_;
+ my ($class, $filename, $wrapped_sub, $orig_sub, $call, $pkg, $proto) = @_;
# The leak guard is rather lengthly (in fact it makes up the most
# of _make_leak_guard). It is possible to split it into a large
@@ -1579,7 +1573,7 @@ sub _make_leak_guard {
# If there is a prototype on the original sub, copy it to the leak
# guard.
- if ($real_proto ne '') {
+ if (defined $proto) {
# The "\&" may appear to be redundant but set_prototype
# croaks when it is removed.
set_prototype(\&$leak_guard, $proto);
Something went wrong with that request. Please try again.