Voici l'erreur !
Can't locate object method "new" via package "XML::LibXML::SAX" (perhaps you forgot to load "XML::LibXML::SAX"?) at /usr/local/share/perl/5.6.1/XML/SAX/ParserFactory.pm line 43.
Pour info :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#!usr/bin/perl/ -w
use Data::Dumper;
use XML::Simple;
use Image::Magick;
use strict;
my $xml;
open(FH, "gamelist.xml") or warn $!;
while(<FH>) {
$xml .= $_;
}
close (FH);
my $xs = new XML::Simple(ForceArray => 1, KeyAttr => []);
#!usr/bin/perl/ -w
use Data::Dumper;
use XML::Simple;
use lib "/home/lib/perl/inserter";
use Image::Magick;
use strict;
my $xml;
open(FH, "gamelist.xml") or warn $!;
while(<FH>) {
$xml .= $_;
}
close (FH);
my $xs = new XML::Simple(ForceArray => 1, KeyAttr => []);
my $ref = $xs->XMLin($xml);
print Dumper($ref) ; |
Si je commente "my $ref = $xs->XMLin($xml);" , plus de problème (mais ça marche pas ! normal).
Si je commente "use Image::Magick;" là aussi plus de problème et XMLin marche très bien (là c'est bizzard).
J'en conclut donc qu'il y a une incompatibilité entre les 2 modules XML::Simple et Image::Magick
Partager