in reply to find out method name from the reference
my %code_ref_hash = ( 'method1' => \&Package1::Method1, 'method2' => \&Package2::Method2, );
Instead of using references, you have the name of the method instead.$code_ref_hash{'method1'}(); # OR $code_ref_hash{'method1'}->();
no strict refs;
|
|---|