Closed carygravel closed 3 years ago
Did you take a look at the tiff.t I sent you in the other PR discussion? I already took care of determining if Graphics::TIFF was available ($has_GT
variable set in the first test), unless you found it doesn't work on Linux. I also updated the skip messages and enabled test 9. I put the Graphics::TIFF check as a separate skip with its own message, but wasn't sure which tests need GT, as I can't run this stuff on Windows. If $OSNAME is no longer used, you should remove use English
. Finally, are Try::Tiny, IPC::Cmd, and any other new test prereq packages part of core at least as far back as 5.20? I don't want to make users have to install new non-core packages if at all possible.
I've incorporated your ideas from PR128 and updated this one.
I have found a few issues with your latest tiff.t:
can_run
finds it! Therefore, I think it would be safer to continue checking the OS to be 'linux' (or, that the OS is not Windows). can_run
could still be used after it's checked that the OS is Linux (or you can go back to test running convert and tiffcp to /dev/null, and omit IPC::Cmd).Try::Tiny
is still in the Makefile.PL. It's not core. Are you still using it anywhere?$has_GT = 0;
line. Are you relying on an undefined $has_GT
being treated as 0? I don't like doing that, as someone may tighten up error checking in the future, and break a lot of things.convert
or tiffcp
having problems with Alpha? Unless it's an easy fix, we should probably just continue skipping this test. Is there a chance that it could be fixed in the not too distant future? If NOT, we should consider removing it altogether....", 1, unless...
definitely the same as ...", 1 unless...
?I made a little utility "isCore.pl" to look up whether a package is core or not:
use strict;
use warnings;
use Module::CoreList;
if (@ARGV != 1) {
print "isCore.pl name-of-module\nreturns whether it is Core and what was the first release (in Core)\n";
exit;
}
if (Module::CoreList::is_core($ARGV[0])) {
print "$ARGV[0] IS a core module\n";
print "First appeared in Perl ".Module::CoreList->first_release($ARGV[0]);
} else {
print "$ARGV[0] is NOT a core module\n";
}
magick
rather convert
.$has_GT
is ever not treated as a boolean false by a condition, then many other things than PDF::Builder will break.Please take another look
skip "message", 1 unless boolean;
would also take undef == 0 if boolean true? Just as a personal coding style, I don't like to leave things like that. I suspect that I could remove "1 unless" and get the same result.convert
or tiffcp
, we're stuck.I have gone ahead and merged your changes. Again, thank you for your work.
This removes the ugly shell-dependent code and make things pure Perl. It also works. I've tested with and without convert and Graphics::TIFF.