Help for this page

Select Code to Download


  1. or download this
    {
        package Foo;
    ...
        sub sane { 42 };
        sub insane { 666 };
    };
    
  2. or download this
    {
        package SaneFoo;
    ...
            bless { Foo => Foo->new }, shift;
        };
    };
    
  3. 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
    
  4. or download this
    {
        package SaneFoo;
    ...
            delete $Foo{$self};
        };
    };