"Dan Anderson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > You're looking for ref(), but first let me give you the "This is often
> > a bad idea" warning.  What are you trying to use the object's name for?
>
> Debugging.  I have a function that writes errors / warnings / errata to
> logs.  Sometimes it could be more transparent if I included things like
> subroutine name / class /etc.
>

Make a debugging subroutine/method that uses the caller() function:

$ perldoc -f caller

it will return all the information you need to know. You can then make your
debugging subs generic.

For higher level stuff, check out Carp::Clan from CPAN. It does stack
traces.

Todd W.



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

Reply via email to