- or download this
package src::bo::Duck;
...
}
1;
- or download this
my $self = {
FLYBEHAVIOUR => { 'VALUE' => undef, 'ACCESS' => 'protected' },
QUACKBEHAVIOUR => { 'VALUE' => undef, 'ACCESS' => 'protected'
+},
};
- or download this
my $closure = sub {
my $field = shift;
...
if ( @_ ) { $self->{$field}->{'VALUE'} = shift; }
return $self->{$field}->{'VALUE'};
};
- or download this
$whistle->("QUACKBEHAVIOUR", src::bo::behaviour::quack::CanQuack->new(
+) );
- or download this
sub setFlyBehaviour {
caller(0)->isa(__PACKAGE__) || confess "setFlyBehaviour is protect
+ed";
...
my $quackBehaviour = shift;
&{ $closure }("QUACKBEHAVIOUR", $quackBehaviour);
}
- or download this
caller(0) eq __PACKAGE__ || confess "setQuackBehaviour is private"
+;
- or download this
package src::bo::Rubber;
...
}
1;
- or download this
sub new {
my $class = shift;
...
bless ($closure, $class);
return $closure;
}