I've actually used it to implement trace debug statements.

sub foo {
  enter();
  #...do something...
  exit();
}

The enter and exit would use caller to get the name of the function and
print a message.

Now, you can use the Aspect module on CPAN, so there is no real reason to do
that anymore.
----- Original Message -----
From: "Nikola Janceski" <[EMAIL PROTECTED]>
To: "'Balint, Jess'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, September 23, 2002 1:23 PM
Subject: RE: Sub Name


> why would you want that? 'use Carp' does something like that, but I think
it
> actually crawls up the stack.
>
> > -----Original Message-----
> > From: Balint, Jess [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, September 23, 2002 1:11 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: Sub Name
> >
> >
> > Hi all. Is there a way to get a subroutine name into a string? Thanks.
> > Jess
> >
> > sub jess{ }
> >
> > sub name{
> > $subref = shift;
> > print $subref;
> > }
> >
> > name( \&jess );
> >
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> --------------------------------------------------------------------------
--
> --------------------
> The views and opinions expressed in this email message are the sender's
> own, and do not necessarily represent the views and opinions of Summit
> Systems Inc.
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to