Help for this page

Select Code to Download


  1. or download this
    sub default_code {
        my ($self,$extra) = @_;
        my $sub = sub { 
    ...
            };
        return $sub;
    }
    
  2. or download this
    $object->display( { my_code => sub { 
                            my ($hashref) = shift;
    ...
                                 }; 
                       }
                     );
    
  3. or download this
    sub display {
       my ($self,$args) = @_;
    ...
       my $action = $args->{'my_code'} || $self->default_code;
       $action->($args);
    }