DBIx::Class::RandomStringColumns - Implicit random string columns
pacakge CD; __PACKAGE__->load_components(qw/RandomStringColumns Core DB/); __PACKAGE__->random_string_columns('uid'); pacakge Artist; __PACKAGE__->load_components(qw/RandomStringColumns Core DB/); __PACKAGE__->random_string_columns(['rid', {length => 10}]); package LoginUser __PACKAGE__->load_components(qw/RandomStringColumns Core DB/); __PACKAGE__->random_string_columns( ['rid', {length => 10}], ['login_id', {length => 15, solt => '[0-9]'}], );
This DBIx::Class component resambles the behaviour of Class::DBI::Plugin::RandomStringColumn, to make some columns implicitly created as random string.
Note that the component needs to be loaded before Core.
$pkg->random_string_columns('uid'); # uid column set random string. $pkg->random_string_columns(['rid', {length=>10}]); # set string length. # set multi column rule $pkg->random_string_columns( 'uid', ['rid', {length => 10}], ['login_id', {length => 15, solt => '[0-9]'}], ); this method need column name, and random string generate option. option is "length", and "solt".
Kan Fushihara <kan __at__ mobilefactory.jp>
<kan __at__ mobilefactory.jp>
Copyright (c) 2006, Kan Fushihara <kan __at__ mobilefactory.jp>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
To install DBIx::Class::RandomStringColumns, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Class::RandomStringColumns
CPAN shell
perl -MCPAN -e shell install DBIx::Class::RandomStringColumns
For more information on module installation, please visit the detailed CPAN module installation guide.