- or download this
my $t= XML::Twig->new( elt_class => 'my_elt_class',
p => sub { $_->cut # an XML::Twig::Elt
+method
->my_process; # a my_elt_class met
+hod
...
{ my $elt= shift;
# stuff here
}
- or download this
# in XML::Twig, every time it needs to create an element
$self->{elt_class} || 'XML::Twig::Elt';
my $element= $elt_class->new;
- or download this
#!/usr/bin/perl -w
use strict;
...
package my_elt3;
BEGIN { @my_elt3::ISA= qw(XML::Twig::Elt); }