From 14d7c44e20f6e334751bcca12b985220d5ebe5fd Mon Sep 17 00:00:00 2001 From: mertz Date: Fri, 16 Apr 2004 09:06:55 +0000 Subject: correction de 3 warnings qui faisaient �chouer le test t/Import.t de Tk::Zinc: Use of implicit split to @_ is deprecated at line 2602. "my" variable $b masks earlier declaration in same scope at line 2721. "my" variable $value masks earlier declaration in same scope at line 3053. --- Perl/Zinc/Graphics.pm | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'Perl/Zinc') diff --git a/Perl/Zinc/Graphics.pm b/Perl/Zinc/Graphics.pm index 71d08ed..8305c81 100644 --- a/Perl/Zinc/Graphics.pm +++ b/Perl/Zinc/Graphics.pm @@ -2598,8 +2598,8 @@ sub zincItemPredominantColor { } else { my $grad = $widget->itemcget($item, -fillcolor); - - return $grad if (scalar (split / /, $grad) < 2); + + return $grad if (scalar (my @unused = (split / /, $grad)) < 2); my @colorparts = split /\|/, $grad; foreach my $section (@colorparts) { @@ -2718,10 +2718,10 @@ sub RGBtoLCH { # Conversion XYZtoLab $gamma = 1/3; - my ($L, $a, $b); + my ($L, $A, $B); if ($Y == 0) { - ($L, $a, $b) = (0, 0, 0); + ($L, $A, $B) = (0, 0, 0); } else { @@ -2733,8 +2733,8 @@ sub RGBtoLCH { $L = (116.0 * $Ys) - 16.0; - $a = 500 * ($Xs - $Ys); - $b = 200 * ($Ys - $Zs); + $A = 500 * ($Xs - $Ys); + $B = 200 * ($Ys - $Zs); } @@ -2742,12 +2742,12 @@ sub RGBtoLCH { my ($C, $H); - if ($a == 0) { + if ($A == 0) { $H = 0; } else { - $H = atan2($b, $a); + $H = atan2($B, $A); if ($H > 0) { $H = ($H / pi) * 180; @@ -2758,7 +2758,7 @@ sub RGBtoLCH { } - $C = sqrt($a**2 + $b**2); + $C = sqrt($A**2 + $B**2); return [$L, $C, $H]; @@ -3046,7 +3046,6 @@ sub min { #----------------------------------------------------------------------------------- sub r_modp { my ($x, $m) = @_; - my $value; return undef if $m == 0; -- cgit v1.1