diff options
author | Yves Orton <demerphq@gmail.com> | 2018-02-24 04:59:50 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2018-02-24 04:59:50 +0100 |
commit | f61fbe7bb36915d6a598df82ede2511d261e41d3 (patch) | |
tree | e5654378cf6e4ed56351cdea4c126703afa9f224 /dist/Carp | |
parent | 7bb6e12450c58b7094ccdfa7025fa495d3996bcf (diff) | |
download | perl-f61fbe7bb36915d6a598df82ede2511d261e41d3.tar.gz |
Revert "Carp: Avoid string eval"
This reverts commit 7bb6e12450c58b7094ccdfa7025fa495d3996bcf.
This patch breaks the behavior of .pmc's. :-(
Until we decide if breaking this rarely used feature is ok I am reverting.
Diffstat (limited to 'dist/Carp')
-rw-r--r-- | dist/Carp/lib/Carp.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm index 3de78d9f6f..610e07fe1a 100644 --- a/dist/Carp/lib/Carp.pm +++ b/dist/Carp/lib/Carp.pm @@ -343,10 +343,10 @@ sub format_arg { # so we need to use overload::StrVal() below. But it's # possible that the overload module hasn't been loaded: # overload methods can be installed without it. So load - # the module here. The bareword form of require is here - # eschewed to avoid iths compile-time effect of vivifying - # vivifying the target module's stash. - require "overload.pm" + # the module here. The eval layer here avoids the + # compile-time effect of require vivifying the target + # module's stash. + eval "require overload; 1" or return "use overload failed"; } my $sub = _fetch_sub(overload => 'StrVal'); |