++ed by:
MINIMAL KEEDI DHOSS BINJOY TOKUHIROM

11 PAUSE users
7 non-PAUSE users.

cho45 (さとう)
and 32 contributors

NAME

Teng::Plugin::FindOrCreate - provide find_or_create method for your Teng class.

NAME

    package MyDB;
    use parent qw/Teng/;
    __PACKAGE__->load_plugin('FindOrCreate');

    package main;
    my $db = MyDB->new(...);
    my $row = $db->find_or_create('user',{name => 'lestrrat'});

DESCRIPTION

This plugin provides find_or_create method.

METHODS

$row = $db->find_or_create($table[, \%args]])

$table table name for counting

\%args : HashRef for row data.