|
|
| go ahead... be a heretic | |
| PerlMonks |
Passing subroutine as argument between packagesby Mateusz (Initiate) |
| on Nov 30, 2011 at 14:10 UTC ( #940865=perlquestion: print w/ replies, xml ) | Need Help?? |
|
Mateusz has asked for the
wisdom of the Perl Monks concerning the following question:
Hi monks, 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? Best regards,
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||