1 # This file is part of Class::Modular and is released under the terms
2 # of the GPL version 2, or any later version at your option. See the
3 # file README and COPYING for more information.
4 # Copyright 2004 by Don Armstrong <don@donarmstrong.com>.
8 use Test::Simple tests => 7;
19 use base qw(Class::Modular);
20 use constant METHODS => 'blah';
32 my $foo = new Foo(qw(bar baz));
35 ok(defined $foo and ref($foo) eq 'Foo' and UNIVERSAL::isa($foo,'Class::Modular'), 'new() works');
39 ok(exists $foo->{_subclasses}{Foo}, 'load() works');
41 ok($foo->blah, 'AUTOLOAD works');
44 #$foo->override('blah',sub{return 2});
45 #ok($foo->blah == 2, 'override() works');
49 ok($foo->can('blah'),'can() works');
52 ok(defined $foo->clone, 'clone() works');
55 ok($foo->handledby('blah') eq 'Foo', 'handledby() works');
59 ok($destroy_hit,'DESTROY called _destroy');