Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
DBIC plugin - generate random string
Perl
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/DBIx/Class
t
.gitignore
.travis.yml
Build.PL
Changes
LICENSE
META.json
README.md
cpanfile
minil.toml

README.md

NAME

DBIx::Class::RandomStringColumns - Implicit random string columns

Build Status

SYNOPSIS

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]'}],
);

DESCRIPTION

This DBIx::Class component reassemble the behavior of Class::DBI::Plugin::RandomStringColumn, to make some columns implicitly created as random string.

Note that the component needs to be loaded before Core.

METHODS

insert

random_string_columns

$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".

get_random_string

AUTHOR

Kan Fushihara <kan __at__ mobilefactory.jp>

LICENSE AND COPYRIGHT

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.

Something went wrong with that request. Please try again.