diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 1999-09-10 20:44:22 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 1999-09-10 20:44:22 +0000 |
commit | 53e9df65959190f4cd34a02fe359bc5e6d2553f6 (patch) | |
tree | 0808e1620b6ecdcd9f64c6db1b8f70966efe542e /lib/Fatal.pm | |
parent | a0ed51b321531af4b47cce24205ab9656f043f0f (diff) | |
parent | 8a7fc0dc3015c8254ce4e866be71508e3379d45d (diff) | |
download | perl-53e9df65959190f4cd34a02fe359bc5e6d2553f6.tar.gz |
Get resolve -at mainline
p4raw-id: //depot/utfperl@4126
Diffstat (limited to 'lib/Fatal.pm')
-rw-r--r-- | lib/Fatal.pm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Fatal.pm b/lib/Fatal.pm index a1e5cffcf4..d1d95af884 100644 --- a/lib/Fatal.pm +++ b/lib/Fatal.pm @@ -111,11 +111,13 @@ EOS $code .= write_invocation($core, $call, $name, @protos); $code .= "}\n"; print $code if $Debug; - $code = eval($code); - die if $@; - local($^W) = 0; # to avoid: Subroutine foo redefined ... - no strict 'refs'; # to avoid: Can't use string (...) as a symbol ref ... - *{$sub} = $code; + { + no strict 'refs'; # to avoid: Can't use string (...) as a symbol ref ... + $code = eval("package $pkg; use Carp; $code"); + die if $@; + local($^W) = 0; # to avoid: Subroutine foo redefined ... + *{$sub} = $code; + } } 1; |