File Coverage

blib/lib/CGI/Test/Form/Widget/Button/Image.pm
Criterion Covered Total %
statement 12 13 92.3
branch n/a
condition n/a
subroutine 4 5 80.0
pod 1 1 100.0
total 17 19 89.4


line stmt bran cond sub pod time code
1             package CGI::Test::Form::Widget::Button::Image;
2 14     14   50 use strict;
  14         18  
  14         339  
3 14     14   50 use warnings;
  14         16  
  14         278  
4             ##################################################################
5             # $Id: Image.pm 411 2011-09-26 11:19:30Z nohuhu@nohuhu.org $
6             # $Name: cgi-test_0-104_t1 $
7             ##################################################################
8             #
9             # Copyright (c) 2001, Raphael Manfredi
10             #
11             # You may redistribute only under the terms of the Artistic License,
12             # as specified in the README file that comes with the distribution.
13             #
14              
15 14     14   47 use Carp;
  14         12  
  14         599  
16              
17             #
18             # This class models a FORM image button.
19             # It's really a submit button in disguise as far as processing goes.
20             #
21              
22 14     14   49 use base qw(CGI::Test::Form::Widget::Button::Submit);
  14         19  
  14         1110  
23              
24             #
25             # Attribute access
26             #
27              
28             sub gui_type
29             {
30 0     0 1   return "image button";
31             }
32              
33             1;
34              
35             =head1 NAME
36              
37             CGI::Test::Form::Widget::Button::Image - A nice submit button
38              
39             =head1 SYNOPSIS
40              
41             # Inherits from CGI::Test::Form::Widget::Button
42             # $form is a CGI::Test::Form
43              
44             my $send = $form->submit_by_name("send");
45             my $answer = $send->press;
46              
47             =head1 DESCRIPTION
48              
49             This class models an image button. Apart from the fact that it's probably
50             nicer on a browser, this widget otherwise behaves like your ordinary
51             submit button.
52              
53             Pressing it immediately triggers an HTTP request, as defined by the form.
54              
55             The interface is the same as the one described in
56             L.
57              
58             =head1 AUTHORS
59              
60             The original author is Raphael Manfredi.
61              
62             Steven Hilton was long time maintainer of this module.
63              
64             Current maintainer is Alexander Tokarev Ftokarev@cpan.orgE>.
65              
66             =head1 SEE ALSO
67              
68             CGI::Test::Form::Widget::Button(3).
69              
70             =cut
71