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
'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,
}
);
-Class::C3 version 0.09
+Class::C3 version 0.10
===========================
INSTALLATION
COPYRIGHT AND LICENCE
-Copyright (C) 2005 Infinity Interactive, Inc.
+Copyright (C) 2005, 2006 Infinity Interactive, Inc.
http://www.iinteractive.com
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
=head1 COPYRIGHT AND LICENSE
-Copyright 2005 by Infinity Interactive, Inc.
+Copyright 2005, 2006 by Infinity Interactive, Inc.
L<http://www.iinteractive.com>
use_ok('Class::C3');
}
-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
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;
}
{
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';