in reply to Re: $object->UnrelatedPackage::some_subroutine()
in thread $object->UnrelatedPackage::some_subroutine()
I've used this when dealing with code that used the above trick to get a custom result without having to go and create a special method for it.my $obj = bless {}; my $method_name = sub {"Just another Perl hacker,\n"}; print $obj->$method_name();
Incidentally if you're using heavy AUTOLOADING, then you're probably better off assigning closures to typeglobs and getting rid of most of your AUTOLOADs. Not necessarily, but it tends to work well in my experience.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: $object->UnrelatedPackage::some_subroutine()
by stvn (Monsignor) on Feb 19, 2005 at 02:43 UTC | |
|
Re^3: $object->UnrelatedPackage::some_subroutine()
by Courage (Parson) on Feb 19, 2005 at 08:27 UTC | |
by tilly (Archbishop) on Feb 21, 2005 at 19:47 UTC |