lib/WWW/Mechanize/FormFiller/Value/Random/Word.pm

filter: Statementstmt 79.2% 42 / 53 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod 100% 2 / 2 totaltotal 77.9% 53 / 68 CC 2 SCAR 2.0
CC
2
Cov
74%
new
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« blib/lib/WWW/Mechanize/FormFiller/Value/Random.pm ↑ Summary lib/WWW/Mechanize/FormFiller/Value/Random/Chars.pm »
1 package WWW::Mechanize::FormFiller::Value::Random::Word;
2 1 ▶use base 'WWW::Mechanize::FormFiller::Value';
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 1 ▶use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Data::Random qw(rand_words);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 $VERSION = '0.13';
7  
8 5 ▶sub new {
Subroutine new: called CC=2 SCAR=7.4
Pod documented
9 2 my ($class,$name,@args) = @_;
10 2 my $self = $class->SUPER::new($name);
11 2 ▶ @args = (size => 1) unless scalar @args;
Branch: 1 branch
BranchTrueFalseTotal
unless scalar @args 0 0 0
12 2 $self->{args} = [ @args ];
13 2 $self;
14 };
15  
16 5 ▶sub value {
Subroutine value: called CC=1 SCAR=0.0
Pod documented
17 1 my ($self,$input) = @_;
18 1 return join " ", @{rand_words( @{$self->{args}} )};
19 };
20  
21 1 1;
22  
23 __END__
« blib/lib/WWW/Mechanize/FormFiller/Value/Random.pm ↑ Summary lib/WWW/Mechanize/FormFiller/Value/Random/Chars.pm »