- or download this
{
package Foo;
...
sub sane { 42 };
sub insane { 666 };
};
- or download this
{
package SaneFoo;
...
bless { Foo => Foo->new }, shift;
};
};
- or download this
use Test::More tests => 3;
use Test::Exception 0.15;
...
ok 1 - The object isa SaneFoo
ok 2 - sane worked
ok 3 - insane failed
- or download this
{
package SaneFoo;
...
delete $Foo{$self};
};
};