FlatBallFlyer has asked for the wisdom of the Perl Monks concerning the following question:
So, if sh, eh and ch are OO Methods, how does this work? Just as important, in the sh, eh and ch methods, will they receive a reference to "$this" as the first parameter? So far I know it's NOT:use XML::Parser:Expat; my $parser = new XML::Parser::Expat; $parser->setHandlers('Start' => \&sh, 'End' => \&eh, 'Char' => \&ch); . . sub sh { my ($p, $el, %atts) = @_; . .
sub parseNavigator { my $this = shift; my $parser = new XML::Parser::Expat; $parser->setHandlers('Start' => \&$this->sh, 'End' => \&$this->eh, 'Char' => \&$this->ch); . . sub sh { my ($this, $p, $el, %atts) = @_; . .
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: OO Callback Function Reference
by almut (Canon) on Feb 04, 2010 at 15:53 UTC | |
by Anonymous Monk on Feb 04, 2010 at 20:21 UTC | |
|
Re: OO Callback Function Reference
by roboticus (Chancellor) on Feb 04, 2010 at 15:52 UTC | |
|
Re: OO Callback Function Reference
by Jenda (Abbot) on Feb 08, 2010 at 09:03 UTC |