At 04:59 PM 2/5/2001 -0600, David L. Nicol wrote:
>James Mastros wrote:
>
> > > At least it's independent of the sub's name. I wish this could be
> > > extended to doing recursive calls without having to say the subs own
> > > name, again.
> > I agree, making the magic variable be the name of the sub is a bad idea.
> >
> > Your idea for a name for the currently executing sub is interesting, I
> > think.  I'm going to fork the thread.
> >
> >         -=- James Mastros
>
>IMO the name of the currently executing sub should be accessed via an
>extention to C<caller()>.
>
>         caller{subname}

Oh? What prints, then?

   $foo = sub {print caller{subname}};
   $foo->();

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to