Good bye, Perl Expat binding!

This commit is contained in:
bubnikv
2017-02-27 00:38:30 +01:00
parent 9ea570ea4e
commit f0f550783f
7 changed files with 2 additions and 253 deletions

View File

@@ -3,27 +3,6 @@ use Moo;
use Slic3r::Geometry qw(X Y Z);
sub read_file {
my $self = shift;
my ($file) = @_;
eval qq{
require Slic3r::Format::AMF::Parser;
use XML::SAX::ParserFactory;
1;
} or die "AMF parsing requires XML::SAX\n";
Slic3r::open(\my $fh, '<', $file) or die "Failed to open $file\n";
my $model = Slic3r::Model->new;
XML::SAX::ParserFactory
->parser(Handler => Slic3r::Format::AMF::Parser->new(_model => $model))
->parse_file($fh);
close $fh;
return $model;
}
sub write_file {
my $self = shift;
my ($file, $model, %params) = @_;