Subject: | 'use constant' syntax breaks in perl 5.6.1 |
Image::Caa doesn't run under my perl v5.6.1 (constant v1.02) --
apparently it doesn't support the
use constant {
foo => 1,
bar => 2,
};
syntax .. fix (which should work in both 5.6.1 and 5.8) is simply to
replace that block with (made from Image::Caa, v1.00):
# dark colors
use constant CAA_COLOR_BLACK => 0;
use constant CAA_COLOR_RED => 1;
use constant CAA_COLOR_GREEN => 2;
use constant CAA_COLOR_YELLOW => 3;
use constant CAA_COLOR_BLUE => 4;
use constant CAA_COLOR_MAGENTA => 5;
use constant CAA_COLOR_CYAN => 6;
use constant CAA_COLOR_LIGHTGRAY => 7;
# light colors
use constant CAA_COLOR_DARKGRAY => 8;
use constant CAA_COLOR_LIGHTRED => 9;
use constant CAA_COLOR_LIGHTGREEN => 10;
use constant CAA_COLOR_BROWN => 11;
use constant CAA_COLOR_LIGHTBLUE => 12;
use constant CAA_COLOR_LIGHTMAGENTA => 13;
use constant CAA_COLOR_LIGHTCYAN => 14;
use constant CAA_COLOR_WHITE => 15;
use constant CAA_LOOKUP_VAL => 32;
use constant CAA_LOOKUP_SAT => 32;
use constant CAA_LOOKUP_HUE => 16;
use constant CAA_HSV_XRATIO => 6;
use constant CAA_HSV_YRATIO => 3;
use constant CAA_HSV_HRATIO => 3;