— |
$Net::Async::HTTP::DAV::Response::VERSION = '0.001' ;
sub new {
my $class = shift ;
my %args = @_ ;
my $self = bless { }, $class ;
my $ws = $self ;
weaken $ws ;
$self ->{xml_handler} = Net::Async::HTTP::DAV::XML->new(
dav => $ws ,
path => $args {path},
map { $_ => $args { $_ } } grep /^on_/, keys %args
);
{
local $XML::SAX::ParserPackage = 'XML::LibXML::SAX::ChunkParser' ;
$self ->{sax} = XML::SAX::ParserFactory->parser( Handler => $self ->{xml_handler}) or die "No SAX parser could be found" ;
};
return $self ;
}
sub parse_chunk { shift ->{sax}->parse_chunk( @_ ) }
1;
|