Help for this page

Select Code to Download


  1. or download this
    sub cando {
       my $o = shift;
    ...
    my $home =  cando($self, 'home')
             // cando($self, 'house', 1)
             // confess(q{Can't determine home});
    
  2. or download this
    my $home =  @{ $self->can($self, 'home')  && [ $self->home()   ]
                || $self->can($self, 'house') && [ $self->house(1) ]
                || confess(q{Can't determine home});
                };