I love the // operator in perl5.10.
Now
my $home = defined( $args->{home} ) ? $args->{home} :
defined($args->{house}) ? $args->{house} :
confess(q{Can't determine home});
can be simplified to
my $home = $args->{home} // $args->{house} // confess(q{Can't determin
+e home});
But if I'm using a super class, is there a shortcut for:
my $home = $self->can('home') ? $self->home :
$self->can('house') ? $self->house(1) :
confess(q{Can't determine home});
Something that would let me write it something like this:
my $home = $self->cando('home') // $self->cando('house',1) // confess(
+q{Can't determine home});
?