|P is for Practical|
Passing subroutine as argument between packagesby Mateusz (Initiate)
|on Nov 30, 2011 at 14:10 UTC||Need Help??|
Mateusz has asked for the
wisdom of the Perl Monks concerning the following question:
I have one question about passing subroutines as arguments in packages.
Here is my simple code for question:* file: FooConfig.pm
* file: Foo.pm
Result is: Undefined subroutine &Foo::FooConfig->important_func called at /path_somewhere/Foo.pm line 123
Im trying &$FooConfig, \$FooConfig and many other this without success. :(
Valid usage this function: $FooConfig->important_func, but reference return &PackageName:: before and i got this error. What's wrong with this?