Help for this page

Select Code to Download


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