On Sun Feb 16 20:36:13 2014, tonyc wrote: > On Thu Feb 06 15:12:28 2014, zefram@fysh.org wrote: > > I'd call that require override well-behaved, in the relevant > > respects. > > It seems excessive to demand that overrides fix up error locations. > > > > This problem can be avoided by base.pm using "CORE::require" to > > suppress > > the override. But that raises other problems. On some older perl > > versions, Lexical::SealRequireHints will use a CORE::GLOBAL::require > > to > > work around a hint leakage bug, if its XS version can't be used. > > > > Module::Runtime suffered the same bug. I fixed it there by using > > "CORE::require". In that case I'm not concerned about breaking > > Lexical::SealRequireHints, because M:R incorporates the fix that > > L:SRH > > would perform via the override. > > > > base.pm could perhaps incorporate the same fix, but M:R and base.pm > > already duplicate a bunch of logic. Perhaps base.pm should use M:R's > > use_package_optimistically(), though that would require dual-lifing > > M:R. > > It would be the better factoring, as use_package_optimistically() was > > specifically designed to provide this subpart of base.pm's operation > > in isolation. > > M::R's functionality would be useful in core, but I'm not sure I'd > want to do it now, with 5.20 coming close. > > > Another option is to drop the part of the error message matching that > > is specific about location. The other parts probably suffice. > > Attached is a patch to do just that. (I have a separate one to bump > $base::VERSION) > > I'll apply this soonish, unless there's an objection. Applied as 257518b902b811b5f69c13080ce7e47c6ccf1611 with a version bump in 6d879f86bf6ce8c5ec6d329f31801a93fed3695e. Tony --- via perlbug: queue: perl5 status: open https://rt.perl.org/Ticket/Display.html?id=121196