Wizard/HTML.pm

filter: Statementstmt 47.8% 11 / 23 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 3 / 6 Podpod 0.0% 0 / 3 totaltotal 35.0% 14 / 40 CC 4 SCAR 17.7
CC
4
Cov
38%
new
12.0
Store
6.0
param
2.0
CRAP 5.9
« Wizard/Elem/Submit/HTML.pm ↑ Summary Wizard/Elem/Shell.pm »
1 # -*- perl -*-
2 #
3 #
4 # Wizard - A Perl package for implementing system administration
5 # applications in the style of Windows wizards.
6 #
7 #
8 # This module is
9 #
10 # Copyright (C) 1999 Jochen Wiedmann
11 # Am Eisteich 9
12 # 72555 Metzingen
13 # Germany
14 #
15 # Email: joe@ispsoft.de
16 # Phone: +49 7123 14887
17 #
18 # and Amarendran R. Subramanian
19 # Grundstr. 32
20 # 72810 Gomaringen
21 # Germany
22 #
23 # Email: amar@ispsoft.de
24 # Phone: +49 7072 920696
25 #
26 # All Rights Reserved.
27 #
28 # You may distribute under the terms of either the GNU General Public
29 # License or the Artistic License, as specified in the Perl README file.
30 #
31  
32 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
33  
34 1 ▶use Wizard ();
Subroutine BEGIN: called CC=1 SCAR=0.0
35 1 ▶use Wizard::Form::HTML ();
Subroutine BEGIN: called CC=1 SCAR=0.0
36  
37  
38 =pod
39  
40 =head1 NAME
41  
42 Wizard::HTML - A subclass for running Wizard applications in HTML::EP.
43  
44  
45 =head1 SYNOPSIS
46  
47 # Create a new HTML wizard
48 use Wizard::HTML;
49 my $wiz = Wizard::Shell->new('form' => $form, 'ep' => $ep)
50  
51  
52 =head1 DESCRIPTION
53  
54 The HTML wizard is a subclass of Wizard, that is used by HTML::EP sites.
55 The input will be read from the associated CGI-Object and the output
56 as HTML code will be built by the elements of the form.
57  
58 =cut
59  
60 package Wizard::HTML;
61  
62 1 @Wizard::HTML::ISA = qw(Wizard);
63  
64 0 ▶sub new {
Subroutine new: not called CC=3 SCAR=24.8
Pod undocumented
65 0 my $self = shift; my $attr = shift;
66 0 ▶ $attr->{'formClass'} ||= 'Wizard::Form::HTML';
Condition0%0/2
$attr->{"formClass"} ||= "Wizard::Form::HTML"
l!l
00
MC/DC0%0/1
$attr->{"formClass"} ||= "Wizard::Form::HTML"
$attr->{"formClass"}
Truth table0%0/2
A
A= $attr->{"formClass"}
Aresult
11
00
67 0 ▶ die "No valid ep object" unless ref($attr->{'ep'});
Branch: 1 branch
BranchTrueFalseTotal
unless ref $attr->{"ep"} 0 0 0
68 0 $self = $self->SUPER::new($attr);
69 0 $self->{'ep'}->{'_ep_wizard'} = $self;
70 }
71  
72  
73 0 ▶sub param { return shift->{'ep'}->{'cgi'}->param(@_); };
Subroutine param: not called CC=1 SCAR=6.9
Pod undocumented
74  
75  
76 0 ▶sub Store {
Subroutine Store: not called CC=2 SCAR=17.9
Pod undocumented
77 0 my $self = shift; my $state = shift;
78 0 ▶ my $ep = $self->{'ep'} || die "no valid ep object available";
Condition0%0/2
$self->{'ep'} || die('no valid ep object available')
l!l
00
MC/DC0%0/1
$self->{'ep'} || die('no valid ep object available')
$self->{'ep'}
Truth table0%0/2
A
A= $self->{'ep'}
Aresult
11
00
79 0 $ep->{'state_modified'} = 1;
80 0 $ep->{'session'}->{'state'} = $state;
81 }
82  
83 1 1;
84  
85 __END__
« Wizard/Elem/Submit/HTML.pm ↑ Summary Wizard/Elem/Shell.pm »