File Coverage

blib/lib/WWW/Mechanize/FormFiller/Value.pm
Criterion Covered Total %
statement 10 11 90.9
branch 2 2 100.0
condition n/a
subroutine 3 4 75.0
pod 3 3 100.0
total 18 20 90.0


line stmt bran cond sub pod time code
1             package WWW::Mechanize::FormFiller::Value;
2              
3 17     17   864 use vars qw( $VERSION @ISA );
  17         41  
  17         3205  
4             $VERSION = '0.11';
5             @ISA = ();
6              
7             sub new {
8 67     67 1 986 my ($class,$name) = @_;
9 67         216 my $self = {
10             name => $name,
11             };
12              
13 67         392 bless $self,$class;
14              
15 67         208 $self;
16             };
17              
18             # You're supposed to override this
19 0     0 1 0 sub value { undef };
20              
21             # You can't set the name, but retrieve it
22 3 100   3 1 948 sub name { my $result = $_[0]->{name}; $_[0]->{name} = $_[1] if scalar @_ == 2; $result };
  3         9  
  3         14  
23              
24             1;
25             __END__