fuzzyfind

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

    my ( $exist, $uuid );
    $exist = $self->find( { uuid => $id } ) and $uuid++
        if $id and $id =~ /\w/;

    defined $exist ? ( $exist, $uuid ) : $self->find($id);
}

namingsence by 2ndlife.

* 16:46 コード修正

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