File Coverage

lib/CGI/FormBuilder/Field/textarea.pm
Criterion Covered Total %
statement 29 29 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod 1 1 100.0
total 37 37 100.0


line stmt bran cond sub pod time code
1              
2             ###########################################################################
3             # Copyright (c) Nate Wiger http://nateware.com. All Rights Reserved.
4             # Please visit http://formbuilder.org for tutorials, support, and examples.
5             ###########################################################################
6              
7             # The majority of this module's methods (including new) are
8             # inherited directly from ::base, since they involve things
9             # which are common, such as parameter parsing. The only methods
10             # that are individual to different fields are those that affect
11             # the rendering, such as script() and tag()
12              
13             package CGI::FormBuilder::Field::textarea;
14              
15 2     2   8 use strict;
  2         2  
  2         54  
16 2     2   6 use warnings;
  2         2  
  2         51  
17 2     2   6 no warnings 'uninitialized';
  2         2  
  2         54  
18              
19 2     2   6 use CGI::FormBuilder::Util;
  2         2  
  2         195  
20 2     2   398 use CGI::FormBuilder::Field::text;
  2         3  
  2         46  
21 2     2   7 use base 'CGI::FormBuilder::Field::text';
  2         2  
  2         350  
22              
23              
24             our $VERSION = '3.10';
25              
26             *render = \&tag;
27             sub tag {
28 6     6 1 13 local $^W = 0; # -w sucks
29 6         4 my $self = shift;
30 6         18 my $attr = $self->attr;
31              
32 6         26 my $jspre = $self->{_form}->jsprefix;
33              
34 6         7 my $tag = '';
35 6         12 my @value = $self->tag_value; # sticky is different in
36              
37 6         7 delete $attr->{type}; # ';
41              
42 6         18 debug 2, "$self->{name}: generated tag = $tag";
43 6         30 return $tag; # always return scalar tag
44             }
45              
46             1;
47              
48             __END__