develooper Front page | perl.perl5.porters | Postings from November 1999

Re: [ID 19991115.012] Localization and goto()

From:
Ilya Zakharevich
Date:
November 16, 1999 10:06
Subject:
Re: [ID 19991115.012] Localization and goto()
Message ID:
199911161806.NAA22442@monk.mps.ohio-state.edu
Nick Ing-Simmons writes:
> >In the particular case I needed it was
> >
> >  local @ISA = (@ISA, 'DynaLoader');
> >  goto \&DynaLoader::bootstrap;
> 
> What is the snag with :
> 
> {
>  local @ISA = (@ISA, 'DynaLoader');
>  &DynaLoader::bootstrap;
> }

This is what the wrapper is currently doing.  But note that the
"depth" of the call to bootstrap() is different.  In particular, any
special processing which "pseudo-unwinds" to upper frames (such as
error reporting by Carp) would see a "wrong" frame.

Apparently, undocumented magic of Carp hides this issue (I could not
solicit "wrong" messages with the above construct), but if goto would
work, it would be a bullet-proof way to do things.

Ilya



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About