Skip Menu |

This queue is for tickets about the Wx-Perl-Imagick CPAN distribution.

Report information
The Basics
Id: 77852
Status: new
Priority: 0/
Queue: Wx-Perl-Imagick

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: SaveFile() error return
Date: Sat, 16 Jun 2012 10:05:38 +1000
To: bug-Wx-Perl-Imagick [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
wxImage SaveFile() returns true for success and false for failure, but in Wx::Perl::Imagick it seems to be the other way around. nosuch.pl below I expected to print "failure" for attempting to load a non-existent file, but it prints "success".
#!/usr/bin/perl -w use strict; use Wx; use Wx::Perl::Imagick; # cf using Wx::Image itself # my $image = Wx::Image->new (20,10); my $image = Wx::Perl::Imagick->new (20,10); my $bool = $image->SaveFile('/no/such/dir/dummy.png'); if ($bool) { print "success\n"; } else { print "failure\n"; } exit 0;