From: Matt S Trout Date: Sun, 10 Jan 2016 19:51:14 +0000 (+0000) Subject: adjust comment to make defensiveness clear X-Git-Tag: v0.003006~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=710f1c32ba19676990ecda960c9eff96c4002328;p=scpubgit%2FObject-Remote.git adjust comment to make defensiveness clear --- diff --git a/lib/Object/Remote/ModuleLoader.pm b/lib/Object/Remote/ModuleLoader.pm index 79ae8b1..9572588 100644 --- a/lib/Object/Remote/ModuleLoader.pm +++ b/lib/Object/Remote/ModuleLoader.pm @@ -28,8 +28,10 @@ BEGIN { # Fudge the error messge to make it work with # Module::Runtime use_package_optimistically # Module::Runtime wants - /\ACan't locate \Q$fn\E .+ at \Q@{[__FILE__]}\E line/ - # the callstack range is a bit of a guess, we want - # to make a reasonable effort, but not spend forever. + # We could probably measure and hard-code this but that could easily + # be a forwards compatibility disaster, so do a quick search of caller + # with a reasonable range; we're already into a woefully inefficient + # situation here so a little defensiveness won't make things much worse for(my $i = 4; $i < 20; $i++) { my ($package, $file, $line) = caller($i);