Mohammed Khatib wrote:

> Hi Everyone,
> 
> I was looking through the list of Perl special variables but couldn't find a
> variable that holds the name of the current module/package (maybe I'm blind
> or just didn't look hard enough).
> 
> I want to say something like:
> 
> die "\n(package name) blah blah blah"
> 
> where (package name) is the current package. I don't want to say $0 because
> that's just the name of the file containing the Perl script.
> 
> Any ideas?


Try :

        my $package = eval {caller};

-- 
   ,-/-  __      _  _         $Bill Luebkert   ICQ=14439852
  (_/   /  )    // //       DBE Collectibles   Mailto:[EMAIL PROTECTED]
   / ) /--<  o // //      http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_     Castle of Medieval Myth & Magic http://www.todbe.com/

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to