File Coverage

blib/lib/Wizard/Elem/Text/Shell.pm
Criterion Covered Total %
statement 6 13 46.1
branch 0 4 0.0
condition n/a
subroutine 2 3 66.6
pod 0 1 0.0
total 8 21 38.1


line stmt bran cond sub pod time code
1             # -*- perl -*-
2             #
3             # Wizard - A Perl package for implementing system administration
4             # applications in the style of Windows wizards.
5             #
6             #
7             # This module is
8             #
9             # Copyright (C) 1999 Jochen Wiedmann
10             # Am Eisteich 9
11             # 72555 Metzingen
12             # Germany
13             #
14             # Email: joe@ispsoft.de
15             # Phone: +49 7123 14887
16             #
17             # and Amarendran R. Subramanian
18             # Grundstr. 32
19             # 72810 Gomaringen
20             # Germany
21             #
22             # Email: amar@ispsoft.de
23             # Phone: +49 7072 920696
24             #
25             # All Rights Reserved.
26             #
27             # You may distribute under the terms of either the GNU General Public
28             # License or the Artistic License, as specified in the Perl README file.
29             #
30             # $Id$
31             #
32              
33 1     1   643 use strict;
  1         2  
  1         30  
34              
35 1     1   5 use Wizard::Elem::Shell ();
  1         2  
  1         155  
36              
37              
38             package Wizard::Elem::Text::Shell;
39              
40             @Wizard::Elem::Text::Shell::ISA = qw(Wizard::Elem::Shell);
41             $Wizard::Elem::Text::Shell::VERSION = '0.01';
42              
43              
44             sub Display {
45 0     0 0   my($self, $wiz, $form, $state) = @_;
46 0 0         my $val = defined($self->{'value'}) ? $self->{'value'} : '';
47 0           $form->print("$self->{'descr'} [$val]: ");
48 0           my $reply = $form->readline();
49 0           chomp $reply;
50 0 0         $reply = $val if $reply eq '';
51 0           $wiz->param($self->{'name'}, $reply);
52             }
53              
54              
55             1;