|
|
|
Clear questions and runnable code get the best and fastest answer |
|
| PerlMonks |
Re: Code references as use() parametersby MarkM (Curate) |
| on Apr 09, 2003 at 16:25 UTC ( #249287=note: print w/ replies, xml ) | Need Help?? |
|
The real problem isn't that the subroutine reference is taken before it exists, as this actually works due to the magic of Perl:
I suspect your problem is that Alzabo::MethodMaker is trying to execute name_maker() before it is defined (otherwise, you wouldn't have this question, as the above code should 'work'). The only way around this is to define name_maker() first, or to delay execution of Alzabo::MethodMaker::import using one of the means suggested by other people.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||