diff options
Diffstat (limited to 'lib/circular/require.pm')
-rw-r--r-- | lib/circular/require.pm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/circular/require.pm b/lib/circular/require.pm index 6a92b7b..3c65846 100644 --- a/lib/circular/require.pm +++ b/lib/circular/require.pm @@ -75,12 +75,11 @@ sub _require { local $loaded_from{$string_file} = $previous_file; local $previous_file = $string_file; my $ret; - # XXX ugh, base.pm checks against the regex + # ugh, base.pm checks against the regex # /^Can't locate .*? at \(eval / to see if it should suppress the error - # but we're not in an eval anymore... fake it for now, but this will - # definitely break if some other module that overrides CORE::require tries - # to do the same thing - if (caller eq 'base') { + # but we're not in an eval anymore + # fake it up so that this looks the same + if (defined((caller(1))[6])) { my $mod = _pm2mod($file); $ret = $saved_require_hook ? $saved_require_hook->($file) |