jettero has asked for the wisdom of the Perl Monks concerning the following question:
When I make new subs in my niffty perl modules, the first argument is sometimes a pointer to the module/object ... whatever, I really don't know exactly.
I need a cool_majik_check to see if the first arg is infact a pointer to itself or not. Sometimes I like to call a function from inside the module which makes it hard to tell.
sub my_funky {
shift if cool_majik_check;
my ($arg1, @others) = @_;
return "What a stup'd funky";
}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: so simple
by merlyn (Sage) on Jun 14, 2000 at 22:00 UTC | |
|
Re: so simple
by gnat (Beadle) on Jun 14, 2000 at 22:27 UTC | |
|
Re: so simple
by Perlmage (Acolyte) on Jun 15, 2000 at 16:26 UTC |