Teng::Plugin::FindOrCreate - provide find_or_create method for your Teng class.
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'});
This plugin provides find_or_create method.
$table table name for counting
\%args : HashRef for row data.
To install Teng, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Teng
CPAN shell
perl -MCPAN -e shell install Teng
For more information on module installation, please visit the detailed CPAN module installation guide.