Data::Model::Mixin::FindOrCreate - add find_or_create method
use Data::Model::Mixin modules => ['FindOrCreate']; $model->find_or_create( tablename => key => { field1 => 'value', field2 => 'value', } ); $model->find_or_create( tablename => [qw/ key1 key2 /] => { field1 => 'value', field2 => 'value', } ); # using unique index, but not use normal index $model->find_or_create( tablename => { unique_idx => 'key' } => { field1 => 'value', field2 => 'value', } ); $model->find_or_create( tablename => { unique_idx => [qw/ key1 key2 /] } => { field1 => 'value', field2 => 'value', } );
Data::Model::Mixin
Kazuhiro Osawa <yappo <at> shibuya <döt> pl>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '<döt>'. Assuming UTF-8
To install Data::Model, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Model
CPAN shell
perl -MCPAN -e shell install Data::Model
For more information on module installation, please visit the detailed CPAN module installation guide.