From: Stevan Little Date: Wed, 8 Feb 2006 15:25:20 +0000 (+0000) Subject: 0.10 X-Git-Tag: 0_10^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=08c2921109d622fd3a1052bf291c246b90fde1a9;p=gitmo%2FClass-C3.git 0.10 --- diff --git a/ChangeLog b/ChangeLog index 7fde149..bb7859a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ Revision history for Perl extension Class::C3. +0.10 - Wed, Feb 8, 2006 + - removed the Sub::Name and NEXT dependencies and + made the test just skip if they are not present + - bumped the Scalar::Util version requirement up + (the newest version tends to work the best across + different platforms) + 0.09 - Fri, Dec 30, 2005 - this is actually the proper version of 0.08, I forgot to check in some modifications, and so they didn't get diff --git a/Makefile.PL b/Makefile.PL index b4fd87e..5aac597 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -5,8 +5,6 @@ WriteMakefile( 'PREREQ_PM' => { 'Test::More' => 0.47, 'Test::Exception' => 0.15, - 'Scalar::Util' => 1.10, - 'Sub::Name' => 0, - 'NEXT' => 0, # for tests only + 'Scalar::Util' => 1.18, } ); diff --git a/README b/README index ae0e312..1223031 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -Class::C3 version 0.09 +Class::C3 version 0.10 =========================== INSTALLATION @@ -18,7 +18,7 @@ This module requires these other modules and libraries: COPYRIGHT AND LICENCE -Copyright (C) 2005 Infinity Interactive, Inc. +Copyright (C) 2005, 2006 Infinity Interactive, Inc. http://www.iinteractive.com diff --git a/lib/Class/C3.pm b/lib/Class/C3.pm index c86f76d..78b420f 100644 --- a/lib/Class/C3.pm +++ b/lib/Class/C3.pm @@ -6,7 +6,7 @@ use warnings; use Scalar::Util 'blessed'; -our $VERSION = '0.09'; +our $VERSION = '0.10'; # this is our global stash of both # MRO's and method dispatch tables @@ -549,7 +549,7 @@ Stevan Little, Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2005 by Infinity Interactive, Inc. +Copyright 2005, 2006 by Infinity Interactive, Inc. L diff --git a/t/32_next_method_edge_cases.t b/t/32_next_method_edge_cases.t index 0e5e913..94e79bf 100644 --- a/t/32_next_method_edge_cases.t +++ b/t/32_next_method_edge_cases.t @@ -9,8 +9,6 @@ BEGIN { use_ok('Class::C3'); } -use Sub::Name; - { { @@ -40,19 +38,24 @@ use Sub::Name; our @ISA = ('Foo'); } - my $m = sub { (shift)->next::method() }; - subname('Bar::bar', $m); - { - no strict 'refs'; - *{'Bar::bar'} = $m; - } - my $bar = Bar->new(); isa_ok($bar, 'Bar'); - isa_ok($bar, 'Foo'); - - can_ok($bar, 'bar'); - my $value = eval { $bar->bar() }; - ok(!$@, '... calling bar() succedded') || diag $@; - is($value, 'Foo::bar', '... got the right return value too'); + isa_ok($bar, 'Foo'); + + SKIP: { + eval 'use Sub::Name'; + skip "Sub::Name is required for this test", 3 if $@; + + my $m = sub { (shift)->next::method() }; + Sub::Name::subname('Bar::bar', $m); + { + no strict 'refs'; + *{'Bar::bar'} = $m; + } + + can_ok($bar, 'bar'); + my $value = eval { $bar->bar() }; + ok(!$@, '... calling bar() succedded') || diag $@; + is($value, 'Foo::bar', '... got the right return value too'); + } } \ No newline at end of file diff --git a/t/33_next_method_used_with_NEXT.t b/t/33_next_method_used_with_NEXT.t index 6547165..fba980d 100644 --- a/t/33_next_method_used_with_NEXT.t +++ b/t/33_next_method_used_with_NEXT.t @@ -3,10 +3,12 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More; -BEGIN { - use_ok('Class::C3'); +BEGIN { + eval "use NEXT"; + plan skip_all => "NEXT required for this test" if $@; + plan tests => 4; } { @@ -36,7 +38,7 @@ BEGIN { package Baz; use strict; use warnings; - use NEXT; + require NEXT; # load this as late as possible so we can catch the test skip use base 'Bar', 'Fuz';