- or download this
package Dinner;
use strict;
...
}
1;
- or download this
#!/usr/bin/perl -w
use strict;
...
# $dirtyeater->washhands;
$dirtyeater->{'handsclean'} = 1;
$dirtyeater->eatfood;
- or download this
$VAR1 = bless( {
'handsclean' => 1
}, 'Dinner' );
- or download this
package Dinnerclosure;
use strict;
...
}
1;
- or download this
#!/usr/bin/perl -w
use strict;
...
$cleaneater->{'eatfood'}->();
print Dumper $cleaneater;
- or download this
$VAR1 = bless( {
'eatfood' => sub { "DUMMY" },
'washhands' => sub { "DUMMY" }
}, 'Dinnerclosure' );