in reply to Re^2: Class capabilities
in thread Class capabilities
Kind of complicated. Why not return as soon as you fail to find any method?
sub does { my ( $proto, @method ) = @_; return if ref $proto && !blessed $proto; my @does; push @does, $proto->can( $_ ) || return foreach @method; return wantarray ? @does : \@does; }
That said I think diotalevi’s Params::Validate recommendation is spot on.
Makeshifts last the longest.
|
|---|