in reply to Code references as use() parameters
Wouldn't a simple pre-declaration in a BEGIN block solve the problem?
You could even put this with or inside the subroutine body to keep things together.
#! perl -slw use Try qw[ \&callback ]; sub callback{ BEGIN{ sub callback; } #do stuff }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Code references as use() parameters
by broquaint (Abbot) on Apr 09, 2003 at 17:00 UTC | |
by BrowserUk (Patriarch) on Apr 09, 2003 at 17:29 UTC |