The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Build.PL 01
Changes 05
LICENSE 44
META.json 1314
META.yml 1617
Makefile.PL 23
lib/Convert/Color/CMY.pm 11
lib/Convert/Color/CMYK.pm 11
lib/Convert/Color/HSL.pm 11
lib/Convert/Color/HSV.pm 11
lib/Convert/Color/RGB.pm 11
lib/Convert/Color/RGB16.pm 11
lib/Convert/Color/RGB8.pm 11
lib/Convert/Color/VGA.pm 11
lib/Convert/Color/X11.pm 11
lib/Convert/Color.pm 11
t/22rgb-dst.t 67
t/23hsv-dst.t 125
t/24hsl-dst.t 125
19 files changed (This is a version diff) 7571
@@ -11,6 +11,7 @@ my $build = Module::Build->new(
    },
    build_requires => {
       'Test::More' => '0.88', # done_testing
+      'Test::Number::Delta' => 0,
    },
    auto_configure_requires => 0, # Don't add M::B to configure_requires
    license => 'perl',
@@ -1,5 +1,10 @@
 Revision history for Convert-Color
 
+0.11    2014/06/01 21:07:03
+        [BUGFIXES]
+         * Unit-test floating-point numbers with approx delta tests; use
+           Test::Number::Delta (RT94761)
+
 0.10    2013/12/30 01:07:36
         [CHANGES]
          * Resolve a cornercase ambiguity between CORE::hex() and sub hex
@@ -1,4 +1,4 @@
-This software is copyright (c) 2013 by Paul Evans <leonerd@leonerd.org.uk>.
+This software is copyright (c) 2014 by Paul Evans <leonerd@leonerd.org.uk>.
 
 This is free software; you can redistribute it and/or modify it under
 the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@ b) the "Artistic License"
 
 --- The GNU General Public License, Version 1, February 1989 ---
 
-This software is Copyright (c) 2013 by Paul Evans <leonerd@leonerd.org.uk>.
+This software is Copyright (c) 2014 by Paul Evans <leonerd@leonerd.org.uk>.
 
 This is free software, licensed under:
 
@@ -22,7 +22,7 @@ This is free software, licensed under:
                      Version 1, February 1989
 
  Copyright (C) 1989 Free Software Foundation, Inc.
- 51 Franklin St, Suite 500, Boston, MA  02110-1335  USA
+ 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
@@ -272,7 +272,7 @@ That's all there is to it!
 
 --- The Artistic License 1.0 ---
 
-This software is Copyright (c) 2013 by Paul Evans <leonerd@leonerd.org.uk>.
+This software is Copyright (c) 2014 by Paul Evans <leonerd@leonerd.org.uk>.
 
 This is free software, licensed under:
 
@@ -4,7 +4,7 @@
       "Paul Evans <leonerd@leonerd.org.uk>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "Module::Build version 0.4202",
+   "generated_by" : "Module::Build version 0.4205",
    "license" : [
       "perl_5"
    ],
@@ -16,7 +16,8 @@
    "prereqs" : {
       "build" : {
          "requires" : {
-            "Test::More" : "0.88"
+            "Test::More" : "0.88",
+            "Test::Number::Delta" : "0"
          }
       },
       "runtime" : {
@@ -29,43 +30,43 @@
    "provides" : {
       "Convert::Color" : {
          "file" : "lib/Convert/Color.pm",
-         "version" : "0.10"
+         "version" : "0.11"
       },
       "Convert::Color::CMY" : {
          "file" : "lib/Convert/Color/CMY.pm",
-         "version" : "0.10"
+         "version" : "0.11"
       },
       "Convert::Color::CMYK" : {
          "file" : "lib/Convert/Color/CMYK.pm",
-         "version" : "0.10"
+         "version" : "0.11"
       },
       "Convert::Color::HSL" : {
          "file" : "lib/Convert/Color/HSL.pm",
-         "version" : "0.10"
+         "version" : "0.11"
       },
       "Convert::Color::HSV" : {
          "file" : "lib/Convert/Color/HSV.pm",
-         "version" : "0.10"
+         "version" : "0.11"
       },
       "Convert::Color::RGB" : {
          "file" : "lib/Convert/Color/RGB.pm",
-         "version" : "0.10"
+         "version" : "0.11"
       },
       "Convert::Color::RGB16" : {
          "file" : "lib/Convert/Color/RGB16.pm",
-         "version" : "0.10"
+         "version" : "0.11"
       },
       "Convert::Color::RGB8" : {
          "file" : "lib/Convert/Color/RGB8.pm",
-         "version" : "0.10"
+         "version" : "0.11"
       },
       "Convert::Color::VGA" : {
          "file" : "lib/Convert/Color/VGA.pm",
-         "version" : "0.10"
+         "version" : "0.11"
       },
       "Convert::Color::X11" : {
          "file" : "lib/Convert/Color/X11.pm",
-         "version" : "0.10"
+         "version" : "0.11"
       }
    },
    "release_status" : "stable",
@@ -74,5 +75,5 @@
          "http://dev.perl.org/licenses/"
       ]
    },
-   "version" : "0.10"
+   "version" : "0.11"
 }
@@ -3,48 +3,49 @@ abstract: 'color space conversions and named lookups'
 author:
   - 'Paul Evans <leonerd@leonerd.org.uk>'
 build_requires:
-  Test::More: 0.88
+  Test::More: '0.88'
+  Test::Number::Delta: '0'
 dynamic_config: 1
-generated_by: 'Module::Build version 0.4202, CPAN::Meta::Converter version 2.133380'
+generated_by: 'Module::Build version 0.4205, CPAN::Meta::Converter version 2.133380'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
-  version: 1.4
+  version: '1.4'
 name: Convert-Color
 provides:
   Convert::Color:
     file: lib/Convert/Color.pm
-    version: 0.10
+    version: '0.11'
   Convert::Color::CMY:
     file: lib/Convert/Color/CMY.pm
-    version: 0.10
+    version: '0.11'
   Convert::Color::CMYK:
     file: lib/Convert/Color/CMYK.pm
-    version: 0.10
+    version: '0.11'
   Convert::Color::HSL:
     file: lib/Convert/Color/HSL.pm
-    version: 0.10
+    version: '0.11'
   Convert::Color::HSV:
     file: lib/Convert/Color/HSV.pm
-    version: 0.10
+    version: '0.11'
   Convert::Color::RGB:
     file: lib/Convert/Color/RGB.pm
-    version: 0.10
+    version: '0.11'
   Convert::Color::RGB16:
     file: lib/Convert/Color/RGB16.pm
-    version: 0.10
+    version: '0.11'
   Convert::Color::RGB8:
     file: lib/Convert/Color/RGB8.pm
-    version: 0.10
+    version: '0.11'
   Convert::Color::VGA:
     file: lib/Convert/Color/VGA.pm
-    version: 0.10
+    version: '0.11'
   Convert::Color::X11:
     file: lib/Convert/Color/X11.pm
-    version: 0.10
+    version: '0.11'
 requires:
-  List::UtilsBy: 0
-  Module::Pluggable: 0
+  List::UtilsBy: '0'
+  Module::Pluggable: '0'
 resources:
   license: http://dev.perl.org/licenses/
-version: 0.10
+version: '0.11'
@@ -1,4 +1,4 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.4202
+# Note: this file was auto-generated by Module::Build::Compat version 0.4205
 use ExtUtils::MakeMaker;
 WriteMakefile
 (
@@ -7,7 +7,8 @@ WriteMakefile
   'PREREQ_PM' => {
                    'List::UtilsBy' => 0,
                    'Module::Pluggable' => 0,
-                   'Test::More' => '0.88'
+                   'Test::More' => '0.88',
+                   'Test::Number::Delta' => 0
                  },
   'INSTALLDIRS' => 'site',
   'EXE_FILES' => [],
@@ -13,7 +13,7 @@ __PACKAGE__->register_color_space( 'cmy' );
 
 use Carp;
 
-our $VERSION = '0.10';
+our $VERSION = '0.11';
 
 =head1 NAME
 
@@ -15,7 +15,7 @@ use List::Util qw( min );
 
 use Carp;
 
-our $VERSION = '0.10';
+our $VERSION = '0.11';
 
 =head1 NAME
 
@@ -13,7 +13,7 @@ __PACKAGE__->register_color_space( 'hsl' );
 
 use Carp;
 
-our $VERSION = '0.10';
+our $VERSION = '0.11';
 
 =head1 NAME
 
@@ -13,7 +13,7 @@ __PACKAGE__->register_color_space( 'hsv' );
 
 use Carp;
 
-our $VERSION = '0.10';
+our $VERSION = '0.11';
 
 =head1 NAME
 
@@ -13,7 +13,7 @@ __PACKAGE__->register_color_space( 'rgb' );
 
 use Carp;
 
-our $VERSION = '0.10';
+our $VERSION = '0.11';
 
 =head1 NAME
 
@@ -13,7 +13,7 @@ __PACKAGE__->register_color_space( 'rgb16' );
 
 use Carp;
 
-our $VERSION = '0.10';
+our $VERSION = '0.11';
 
 =head1 NAME
 
@@ -13,7 +13,7 @@ __PACKAGE__->register_color_space( 'rgb8' );
 
 use Carp;
 
-our $VERSION = '0.10';
+our $VERSION = '0.11';
 
 =head1 NAME
 
@@ -13,7 +13,7 @@ __PACKAGE__->register_color_space( 'vga' );
 
 use Carp;
 
-our $VERSION = '0.10';
+our $VERSION = '0.11';
 
 =head1 NAME
 
@@ -13,7 +13,7 @@ __PACKAGE__->register_color_space( 'x11' );
 
 use Carp;
 
-our $VERSION = '0.10';
+our $VERSION = '0.11';
 
 # Different systems put it in different places. We'll try all of them taking
 # the first we find
@@ -16,7 +16,7 @@ use Module::Pluggable require => 0,
                       search_path => [ 'Convert::Color' ];
 my @plugins = Convert::Color->plugins;
 
-our $VERSION = '0.10';
+our $VERSION = '0.11';
 
 =head1 NAME
 
@@ -4,6 +4,7 @@ use strict;
 use warnings;
 
 use Test::More;
+use Test::Number::Delta;
 
 use Convert::Color::RGB;
 use Convert::Color::RGB8;
@@ -17,9 +18,9 @@ my $blue  = Convert::Color::RGB->new( 0, 0, 1 );
 
 is( $black->dst_rgb( $black ), 0, 'black->dst_rgb black' );
 
-is( $black->dst_rgb( $red   ), 1/sqrt(3), 'black->dst_rgb red' );
-is( $black->dst_rgb( $green ), 1/sqrt(3), 'black->dst_rgb green' );
-is( $black->dst_rgb( $blue  ), 1/sqrt(3), 'black->dst_rgb blue' );
+delta_ok( $black->dst_rgb( $red   ), 1/sqrt(3), 'black->dst_rgb red' );
+delta_ok( $black->dst_rgb( $green ), 1/sqrt(3), 'black->dst_rgb green' );
+delta_ok( $black->dst_rgb( $blue  ), 1/sqrt(3), 'black->dst_rgb blue' );
 
 is( $black->dst_rgb( $white ), 1, 'black->dst_rgb white' );
 
@@ -40,9 +41,9 @@ my $blue8  = Convert::Color::RGB8->new(   0,   0, 255 );
 is( $black8->dst_rgb8( $black8 ), 0, 'black8->dst_rgb8 black8' );
 is( $black8->dst_rgb8( $black  ), 0, 'black8->dst_rgb8 black' );
 
-is( $black8->dst_rgb8( $red8   ), 1/sqrt(3), 'black8->dst_rgb8 red8' );
-is( $black8->dst_rgb8( $green8 ), 1/sqrt(3), 'black8->dst_rgb8 green8' );
-is( $black8->dst_rgb8( $blue8  ), 1/sqrt(3), 'black8->dst_rgb8 blue8' );
+delta_ok( $black8->dst_rgb8( $red8   ), 1/sqrt(3), 'black8->dst_rgb8 red8' );
+delta_ok( $black8->dst_rgb8( $green8 ), 1/sqrt(3), 'black8->dst_rgb8 green8' );
+delta_ok( $black8->dst_rgb8( $blue8  ), 1/sqrt(3), 'black8->dst_rgb8 blue8' );
 
 is( $black8->dst_rgb8( $white8 ), 1, 'black8->dst_rgb8 white8' );
 is( $black8->dst_rgb8( $white  ), 1, 'black8->dst_rgb8 white' );
@@ -4,6 +4,7 @@ use strict;
 use warnings;
 
 use Test::More;
+use Test::Number::Delta;
 
 use Convert::Color::HSV;
 
@@ -14,21 +15,13 @@ my $green = Convert::Color::HSV->new( 120, 1, 1 );
 my $cyan  = Convert::Color::HSV->new( 180, 1, 1 );
 my $blue  = Convert::Color::HSV->new( 240, 1, 1 );
 
-sub about
-{
-   my ( $got, $expect, $name ) = @_;
-
-   ok( abs( $got - $expect ) < 0.000001, $name ) or
-      diag( "got $got, expected $expect" );
-}
-
 is( $black->dst_hsv( $black ), 0, 'black->dst_hsv black' );
 
-about( $black->dst_hsv( $red   ), 1/sqrt(2), 'black->dst_hsv red' );
-about( $black->dst_hsv( $green ), 1/sqrt(2), 'black->dst_hsv green' );
-about( $black->dst_hsv( $blue  ), 1/sqrt(2), 'black->dst_hsv blue' );
+delta_ok( $black->dst_hsv( $red   ), 1/sqrt(2), 'black->dst_hsv red' );
+delta_ok( $black->dst_hsv( $green ), 1/sqrt(2), 'black->dst_hsv green' );
+delta_ok( $black->dst_hsv( $blue  ), 1/sqrt(2), 'black->dst_hsv blue' );
 
-about( $black->dst_hsv( $white ), 1/2, 'black->dst_hsv white' );
+delta_ok( $black->dst_hsv( $white ), 1/2, 'black->dst_hsv white' );
 
 is( $red->dst_hsv( $cyan ), 1, 'red->dst_hsv cyan' );
 
@@ -4,6 +4,7 @@ use strict;
 use warnings;
 
 use Test::More;
+use Test::Number::Delta;
 
 use Convert::Color::HSL;
 
@@ -14,21 +15,13 @@ my $green = Convert::Color::HSL->new( 120, 1, 0.5 );
 my $cyan  = Convert::Color::HSL->new( 180, 1, 0.5 );
 my $blue  = Convert::Color::HSL->new( 240, 1, 0.5 );
 
-sub about
-{
-   my ( $got, $expect, $name ) = @_;
-
-   ok( abs( $got - $expect ) < 0.000001, $name ) or
-      diag( "got $got, expected $expect" );
-}
-
 is( $black->dst_hsl( $black ), 0, 'black->dst_hsl black' );
 
-about( $black->dst_hsl( $red   ), sqrt(1.25/4), 'black->dst_hsl red' );
-about( $black->dst_hsl( $green ), sqrt(1.25/4), 'black->dst_hsl green' );
-about( $black->dst_hsl( $blue  ), sqrt(1.25/4), 'black->dst_hsl blue' );
+delta_ok( $black->dst_hsl( $red   ), sqrt(1.25/4), 'black->dst_hsl red' );
+delta_ok( $black->dst_hsl( $green ), sqrt(1.25/4), 'black->dst_hsl green' );
+delta_ok( $black->dst_hsl( $blue  ), sqrt(1.25/4), 'black->dst_hsl blue' );
 
-about( $black->dst_hsl( $white ), 0.5, 'black->dst_hsl white' );
+delta_ok( $black->dst_hsl( $white ), 0.5, 'black->dst_hsl white' );
 
 is( $red->dst_hsl( $cyan ), 1, 'red->dst_hsl cyan' );