perlfan99 has asked for the wisdom of the Perl Monks concerning the following question:
sub test { my $function_ref = shift; # if ( $function_ref == package1::method1 ) # do something # elsif ( $function_ref == package2::method2) # do something ... } test(\&package1::method1); test(\&package2::method2);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: find out method name from the reference
by betterworld (Curate) on Aug 18, 2008 at 01:38 UTC | |
|
Re: find out method name from the reference
by syphilis (Archbishop) on Aug 18, 2008 at 01:29 UTC | |
|
Re: find out method name from the reference
by GrandFather (Saint) on Aug 18, 2008 at 00:05 UTC | |
|
Re: find out method name from the reference
by repellent (Priest) on Aug 18, 2008 at 04:37 UTC | |
|
Re^2: find out method name from the reference
by Viki@Stag (Sexton) on Aug 18, 2008 at 07:53 UTC | |
|
Re: find out method name from the reference
by phaylon (Curate) on Aug 19, 2008 at 11:20 UTC | |
by taghi (Initiate) on Oct 07, 2008 at 19:33 UTC | |
|
Re: find out method name from the reference
by JavaFan (Canon) on Aug 18, 2008 at 11:40 UTC |