Skip to content

Commit

Permalink
debug-print registration hash in test
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Mar 27, 2024
1 parent b53f3b2 commit 52890a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions lib/PDL/Graphics/Simple/PGPLOT.pm
Original file line number Diff line number Diff line change
Expand Up @@ -367,21 +367,22 @@ sub plot {

}


sub DESTROY {
my $me = shift;

$me->{obj}->release;

if($me->{type} =~ m/^f/i) {
if (defined $me->{type} and $me->{type} =~ m/^f/i) {
eval { $me->{obj}->close; };

my $file = ( ($me->{conv_fn}) ? $me->{conv_fn} : $me->{output} );
if($me->{conv_fn}) {
if ($me->{conv_fn}) {
my $a;
$a = rim($me->{conv_fn}) ;
wim($a, $me->{opt}->{output});
unlink($me->{conv_fn});
}
}
}

1;
3 changes: 2 additions & 1 deletion t/simple.t
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ for my $engine (@engines) {
ok( ( ref($mods->{$engine}) eq 'HASH' and ($module = $mods->{$engine}->{module}) ),
"there is a modules entry for $engine ($module)" );

SKIP: {
SKIP: {
my $check_ok = eval {${module}->can('check')->(1)};
is($@, '', "${module}::check() ran OK");
diag "module '$engine' registration hash: ", explain $mods->{$engine};

unless($check_ok) {
no strict 'refs';
Expand Down

0 comments on commit 52890a8

Please sign in to comment.