NAME
App::Test::DWG::LibreDWG::JSON - Base class for test-dwg-libredwg-json script.
SYNOPSIS
use App::Test::DWG::LibreDWG::JSON;
my $app = App::Test::DWG::LibreDWG::JSON->new;
my $exit_code = $app->run;
METHODS
new
my $app = App::Test::DWG::LibreDWG::JSON->new;
Constructor.
Returns instance of object.
run
my $exit_code = $app->run;
Run.
Returns 1 for error, 0 for success.
EXAMPLE
use strict;
use warnings;
use App::Test::DWG::LibreDWG::JSON;
use File::Temp qw(tempfile);
use IO::Barf qw(barf);
use MIME::Base64;
my $dwg_in_base64 = <<'END';
QUMxLjQwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgIAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAChA
AAAAAAAAIkAAAAAAAAAYQKEoVK4NihJAAAAAAAAAAAChKFSuDYoiQAAAAAAAAAAA8D8AAAAAAAAA
AAAAAAABAAEAmJmZmZmZyT+YmZmZmZmpPwEADwAAAA8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A
/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/
AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A
/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/
AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A
AAAAAAAAAAAffplKebb0PwIABAABAAEAAAAAAAAAAAAAAAAAAAAAANA/mJmZmZmZuT8AAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAA==
END
my (undef, $tmp_file) = tempfile();
barf($tmp_file, decode_base64($dwg_in_base64));
# Arguments.
@ARGV = (
'-v9',
$tmp_file,
);
# Run.
my $exit_code = App::Test::DWG::LibreDWG::JSON->new->run;
# Print out.
print "Exit code: $exit_code\n";
# Output like:
# Exit code: 0
DEPENDENCIES
Capture::Tiny, File::Copy, File::Path, File::Spec::Functions, File::Temp, Getopt::Std, IO::Barf, Readonly.
REPOSITORY
https://github.com/michal-josef-spacek/App-Test-DWG-LibreDWG-JSON
AUTHOR
Michal Josef Špaček mailto:skim@cpan.org
LICENSE AND COPYRIGHT
© 2023 Michal Josef Špaček
BSD 2-Clause License
VERSION
0.04