in reply to Proper syntax for using a method as a call back routine?
Is this something you could profitably use local for?
E.g.,
This makes _add_link a sort of spring-loaded method call.local $instance = $self; $parser->handler(start => \_add_link, 'tagname,attr'); ... sub _add_link { my $self = $instance; ...
Update: Forget this, and go with BrowserUk's suggestion below. Using a closure is a superior approach.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Proper syntax for using a method as a call back routine?
by BrowserUk (Patriarch) on Jul 08, 2003 at 03:15 UTC | |
by dws (Chancellor) on Jul 08, 2003 at 03:17 UTC | |
by BrowserUk (Patriarch) on Jul 08, 2003 at 03:35 UTC |