Subject: | example/cb_example.pl |
Hi,
a look into the example for callbacks ( cb_example.pl ) show some errors. Please apply the attached patch to make the example working out of the box.
diff -ur a/example/cb_example.pl b/example/cb_example.pl
--- a/example/cb_example.pl 2003-11-01 15:37:52.000000000 +0100
+++ b/example/cb_example.pl 2003-11-01 15:41:01.000000000 +0100
@@ -1,4 +1,5 @@
use XML::LibXML;
+use IO::File;
# first instanciate the parser
my $parser = XML::LibXML->new();
@@ -29,10 +30,10 @@
my $handler = new IO::File;
if ( not $handler->open( "<$uri" ) ){
- $file = 0;
- }
-
- return $file;
+ $handler = 0;
+ }
+
+ return $handler;
}
sub read_uri {
@@ -40,7 +41,7 @@
my $length = shift;
my $buffer = undef;
if ( $handler ) {
- $handler->read( $rv , $length );
+ $handler->read( $buffer, $length );
}
return $buffer;
}