>>>>> "BT" == Ben Tilly <[EMAIL PROTECTED]> writes:

  BT> The purpose of using goto there is in case some code uses caller() and
  BT> could get confused about the extra subroutine.  (For instance Carp
  BT> would be likely to warn at the enclosing subroutine that you defined.)

i ran into that problem when doing error handling in file::slurp. i
wanted an error handler to be called in several places which would carp
to the correct level (and also return directly to the caller). so magic
goto was my answer at the time. but i have since learned that carp (or
some cpan variant) can be used properly several call levels down from
the original call into a module. i think it backtraces to find a package
different from the one that did the carping (where you are now). i
haven't looked at it in detail but it sounds like it would be useful in
this case too.

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to