| 1 | package DBIx::DataFactory::Type::Str; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 2 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 2 | ▶ | use base qw(DBIx::DataFactory::Type); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 2 | ▶ | use Smart::Args; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 2 | ▶ | use String::Random; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 2 | ▶ | sub type_name { 'Str' } | ||||||||
|
Subroutine
type_name: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 13 | |||||||||||
| 14 | 2 | ▶ | sub make_value { | ||||||||
|
Subroutine
make_value: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 15 | 2 | args my $class => 'ClassName', | |||||||||
| 16 | my $size => {isa => 'Int', optional => 1, default => 20}, | ||||||||||
| 17 | my $regexp => {isa => 'Str', optional => 1}; | ||||||||||
| 18 | |||||||||||
| 19 | 2 | ▶ | $regexp = "[a-zA-Z0-9]{$size}" unless $regexp; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 2 | return String::Random->new->randregex($regexp); | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 2 | 1; | |||||||||