porta has asked for the wisdom of the Perl Monks concerning the following question:
And, I have my script test.pl which has:package Foo; sub new { my ($class) = @_; my $self = {}; bless $self, $class; }
And my question is: Is there a way that I can, inside Foo.pm, know the name of the variable that I'm using on test.pl?use Foo; my $one = Foo->new; my $second = Foo->new;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Variable Name Mistery. Who calls?
by ikegami (Patriarch) on Oct 25, 2006 at 16:32 UTC | |
by Fletch (Bishop) on Oct 25, 2006 at 16:46 UTC | |
|
Re: Variable Name Mistery. Who calls?
by sauoq (Abbot) on Oct 25, 2006 at 17:17 UTC | |
by porta (Sexton) on Oct 25, 2006 at 18:53 UTC | |
by ikegami (Patriarch) on Oct 25, 2006 at 19:16 UTC | |
by cephas (Pilgrim) on Oct 25, 2006 at 19:26 UTC | |
by porta (Sexton) on Oct 25, 2006 at 22:17 UTC | |
by ikegami (Patriarch) on Oct 26, 2006 at 02:19 UTC | |
by ysth (Canon) on Oct 26, 2006 at 00:01 UTC | |
|
Re: Variable Name Mistery. Who calls?
by cephas (Pilgrim) on Oct 25, 2006 at 17:27 UTC | |
|
Re: Variable Name Mistery. Who calls?
by gam3 (Curate) on Oct 25, 2006 at 23:45 UTC | |
by Hofmator (Curate) on Oct 26, 2006 at 09:43 UTC | |
|
Re: Variable Name Mistery. Who calls?
by Anonymous Monk on Oct 25, 2006 at 17:26 UTC | |
|
Re: Variable Name Mistery. Who calls?
by DrHyde (Prior) on Oct 26, 2006 at 09:37 UTC |