Created
September 2, 2011 07:10
-
-
Save larsen/1188085 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # siamo in un contesto in cui nello | |
| # scope c'e` $self | |
| my $sh = sub { | |
| $self->... # $self e` usabile | |
| # il resto come solito | |
| my ($p, $el, %atts) = @_; | |
| $p->setHandlers('Char' => \&spec) | |
| if ($el eq 'special'); | |
| ... | |
| } | |
| $parser = XML::Parser::Expat->new; | |
| $parser->setHandlers('Start' => $sh ); | |
| open(FOO, '<', 'info.xml') or die "Couldn't open"; | |
| $parser->parse(*FOO); | |
| close(FOO); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment