Test/Form/Widget/Button/Image.pm

filter: Statementstmt 92.8% 13 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 1 / 1 totaltotal 90.0% 18 / 20 CC 1 SCAR 1.8
CC
1
Cov
93%
gui_type
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Test/Form/Widget/Box/Check.pm ↑ Summary Test/Form/Widget/Button/Submit.pm »
1 package CGI::Test::Form::Widget::Button::Image;
2 14 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 14 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
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 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
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 ▶use base qw(CGI::Test::Form::Widget::Button::Submit);
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 #
25 # Attribute access
26 #
27  
28 sub gui_type
29 0 ▶{
Subroutine gui_type: not called CC=1 SCAR=6.9
Pod documented
30 0 return "image button";
31 }
32  
33 14 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<CGI::Test::Form::Widget::Button>.
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 F<E<lt>tokarev@cpan.orgE<gt>>.
65  
66 =head1 SEE ALSO
67  
68 CGI::Test::Form::Widget::Button(3).
69  
70 =cut
71  
« Test/Form/Widget/Box/Check.pm ↑ Summary Test/Form/Widget/Button/Submit.pm »