[Israel.pm] Skip a frame
Ephraim Dan
E.Dan at F5.com
Thu Mar 27 13:28:37 EET 2008
I would recommend die/eval as Gabor did, but I think that "goto LABEL"
will work...
> -----Original Message-----
> From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On
> Behalf Of Peter Gordon
> Sent: Thursday, March 27, 2008 13:03
> To: Perl in Israel
> Subject: Re: [Israel.pm] Skip a frame
>
> I didn't want to do that either. I was rather hoping for something
> that manipulates caller()/GOTO...
>
> Peter
>
> On Thu, 2008-03-27 at 12:23 +0200, Gabor Szabo wrote:
> > On Thu, Mar 27, 2008 at 11:36 AM, Peter Gordon <peter at pg-
> consultants.com> wrote:
> > > I have a program which is several subroutines deep.
> > >
> > > level 1
> > > level 2
> > > level 3
> > > level 4
> > >
> > >
> > > At level 4, instead of doing a "return", I would like to skip
back
> to
> > > level 2. The issue is that I don't want to change the code at
> level 3 to
> > > check return codes.
> >
> >
> > You can throw an exception at level 4 and catch it on level 2.
> >
> > Gabor
> >
> >
>
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl
More information about the Perl
mailing list