W
werwer
This isn't about PerlSAX, but a package construct I found there in an
example using the module. I have no idea what's going on here so I'm
guessing. This appears in the code
my $handler = SaxHandler->new();
But there is no SaxHandler anywhere in the documentation ..... but
wait! Later in the code the author defines a package as in
package SaxHandler;
and in this package are subroutines with names of the callbacks, the
SAX event handling routines, that SAX will call for each different XML
event (starting ending new final ....)
I had no idea a package name could be used in such a fashion. I
appreciate some short discussion of what's going on. Thanks.
example using the module. I have no idea what's going on here so I'm
guessing. This appears in the code
my $handler = SaxHandler->new();
But there is no SaxHandler anywhere in the documentation ..... but
wait! Later in the code the author defines a package as in
package SaxHandler;
and in this package are subroutines with names of the callbacks, the
SAX event handling routines, that SAX will call for each different XML
event (starting ending new final ....)
I had no idea a package name could be used in such a fashion. I
appreciate some short discussion of what's going on. Thanks.