Teng::Plugin::Lookup - lookup single row.
package MyDB;use parent qw/Teng/;__PACKAGE__->load_plugin('Lookup');package main;my $db = MyDB->new(...);$db->lookup('user' => +{id => 1}); # => get single row
package
MyDB;
use
parent
qw/Teng/
;
__PACKAGE__->load_plugin(
'Lookup'
);
main;
my
$db
= MyDB->new(...);
->lookup(
'user'
=> +{
id
=> 1});
# => get single row
This plugin provides fast lookup row .
lookup single row records.
Teng#single is heavy.
NOTE: Unlike Teng#single, this method returns a blank list in list context when no desired records are found.
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.