in reply to Help with XML::Twig::Gedcom
It is very simple:
my $t = XML::Twig->new( twig_roots => { "IndividualRec[\@Id=\"$individual_id\"]" = +> sub { load_individual( @_, \%hash); } } ); ... sub load_individual { my( $t, $individual, $hashref)= @_; ... }
What you do here is create a closure, but you really don't have to know that! Achieving Closure has more explanations on what happens under the hood.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Help with XML::Twig::Gedcom
by buttroast (Scribe) on Oct 18, 2004 at 16:36 UTC | |
by mirod (Canon) on Oct 18, 2004 at 16:51 UTC | |
by buttroast (Scribe) on Oct 19, 2004 at 01:07 UTC |