refactored

sub fuzzyfind { my ( $self, $id ) = @_;

    $id and $id =~ /\D/
        ? ( $self->find( { uuid => $id } ), 1 )
        : $self->find($id);
}

こうか。

by typester / at 2006-02-12T17:46:00 / perl · dbic / Comments(0)