summaryrefslogtreecommitdiff
path: root/dist/Carp
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2018-02-24 05:42:51 +0100
committerYves Orton <demerphq@gmail.com>2018-02-24 05:42:51 +0100
commit6ccface2f73d9f16aa9cd1ac99313b2f822cf150 (patch)
treec930fbbe3456a118daf32fe49f4bf2bba225635e /dist/Carp
parentf61fbe7bb36915d6a598df82ede2511d261e41d3 (diff)
downloadperl-6ccface2f73d9f16aa9cd1ac99313b2f822cf150.tar.gz
Revert "Revert "Carp: Avoid string eval""
This reverts commit f61fbe7bb36915d6a598df82ede2511d261e41d3. After further research it appears that this does NOT break .pmc's The docs on .pmc's leave much to be desired.
Diffstat (limited to 'dist/Carp')
-rw-r--r--dist/Carp/lib/Carp.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm
index 610e07fe1a..3de78d9f6f 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 eval layer here avoids the
- # compile-time effect of require vivifying the target
- # module's stash.
- eval "require overload; 1"
+ # 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"
or return "use overload failed";
}
my $sub = _fetch_sub(overload => 'StrVal');