Re: [xml] XML callback functions
- From: Matt Sergeant <matt sergeant org>
- To: dhogan <dhogan linuxcomm net>
- Cc: "xml gnome org" <xml gnome org>
- Subject: Re: [xml] XML callback functions
- Date: Fri, 15 Jun 2001 04:26:09 +0100 (BST)
On Thu, 14 Jun 2001, dhogan wrote:
I am writting a class that will use XML::LibXML and I am using the
callback methods in order
to feed it a dtd. I need to know if I can give the callback a method
call instead of a reference to
a sub-routine.
Where I would
XML::LibXML->read_callback(\&mycustomsub);
can I say;
my $self = {};
bless $self, $class;
XML::LibXML->read_callback($self->mycustommethod);
You have to make it a closure:
XML::LibXML->read_callback(sub { $self->mycustommethod(@_) });
--
<Matt/>
/|| ** Founder and CTO ** ** http://axkit.com/ **
//|| ** AxKit.com Ltd ** ** XML Application Serving **
// || ** http://axkit.org ** ** XSLT, XPathScript, XSP **
// \\| // ** mod_perl news and resources: http://take23.org **
\\//
//\\
// \\
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]