Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm not worthy. My Perl foo is weak.
I'm searching for how to output the name of the module which is currently running without resorting to defining my own strings. ie. something more rigorous than the following feeble attempt:
#!/bin/env perl my $s = "I'm in main!\n"; print $s; package foo; my $s = "I'm in package foo!\n"; print $s;
Is there hope for the unwashed? I humbly thank you for any enlightenment shared.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: finding module name?
by kyle (Abbot) on Jan 24, 2009 at 01:53 UTC | |
|
Re: finding module name?
by Marshall (Canon) on Jan 24, 2009 at 03:59 UTC | |
|
Re: finding module name?
by lakshmananindia (Chaplain) on Jan 24, 2009 at 04:29 UTC | |
by chromatic (Archbishop) on Jan 24, 2009 at 04:57 UTC |