Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 218

Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 219

Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 220
use lib 'lib'; package Foo; use strict; use Spiffy -base; field 'xxx'; field 'dog'; field 'bog'; sub new { my $self = super; $self->xxx('XXX'); return $self; } sub poodle { my $self = shift; my $count = shift; $self->dog("$count poodle"); } sub doodle { my $self = shift; my $count = shift; $self->bog("$count doodle"); } package Bar; use strict; BEGIN { Foo->base } sub poodle { my $self = shift; super; $self->dog($self->dog . ' dogs'); } sub doodle { my $self = shift; eval 'eval "super"'; $self->bog($self->bog . ' bogs'); } package main; use strict; use Test::More tests => 3; my $f = Bar->new; is($f->{xxx}, 'XXX'); $f->poodle(3); is($f->{dog}, '3 poodle dogs'); $f->doodle(4); is($f->{bog}, '4 doodle bogs');