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

Re: [ID 19991115.012] Localization and goto()

Ilya Zakharevich
November 16, 1999 10:06
Re: [ID 19991115.012] Localization and goto()
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About