VBTK/Actions/Email/Page.pm untested

filter: Statementstmt 0.0% 0 / 29 Branchbran n/a Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 47 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #############################################################################
2 #
3 # NOTE: This file under revision control using RCS
4 # Any changes made without RCS will be lost
5 #
6 # $Source: /usr/local/cvsroot/vbtk/VBTK/Actions/Email/Page.pm,v $
7 # $Revision: 1.6 $
8 # $Date: 2002/03/04 20:53:07 $
9 # $Author: bhenry $
10 # $Locker: $
11 # $State: Exp $
12 #
13 # Purpose: An extension of the VBTK::Actions library which defaults
14 # to common settings used in creating a page action.
15 #
16 # Depends on: VBTK::Common, VBTK::Actions
17 #
18 # Copyright (C) 1996-2002 Brent Henry
19 #
20 # This program is free software; you can redistribute it and/or
21 # modify it under the terms of version 2 of the GNU General Public
22 # License as published by the Free Software Foundation available at:
23 # http://http://www.gnu.org/copyleft/gpl.html
24 #
25 # This program is distributed in the hope that it will be useful,
26 # but WITHOUT ANY WARRANTY; without even the implied warranty of
27 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 # GNU General Public License for more details.
29 #
30 #############################################################################
31 #
32 #
33 # REVISION HISTORY:
34 #
35 # $Log: Page.pm,v $
36 # Revision 1.6 2002/03/04 20:53:07 bhenry
37 # *** empty log message ***
38 #
39 # Revision 1.5 2002/03/04 16:49:09 bhenry
40 # Changed requirement back to perl 5.6.0
41 #
42 # Revision 1.4 2002/03/04 16:46:39 bhenry
43 # *** empty log message ***
44 #
45 # Revision 1.3 2002/03/02 00:53:55 bhenry
46 # Documentation updates
47 #
48 # Revision 1.2 2002/02/20 19:25:18 bhenry
49 # *** empty log message ***
50 #
51 # Revision 1.1 2002/02/19 19:01:28 bhenry
52 # Rewrote Actions to make use of inheritance
53 #
54  
55 package VBTK::Actions::Email::Page;
56  
57 use 5.6.0;
58 use strict;
59 use warnings;
60 # I like using undef as a value so I'm turning off the uninitialized warnings
61 no warnings qw(uninitialized);
62  
63 use VBTK::Common;
64 use VBTK::Actions::Email;
65  
66 # Inherit methods from Actions::Email class
67 our @ISA = qw(VBTK::Actions::Email);
68  
69 our $VERBOSE = $ENV{VERBOSE};
70  
71 #-------------------------------------------------------------------------------
72 # Function: new
73 # Description: Object constructor. Allocates memory for all class members
74 # Input Parms:
75 # Output Parms: Pointer to class
76 #-------------------------------------------------------------------------------
77 sub new
78 {
79 my $type = shift;
80 my $self = {};
81 bless $self, $type;
82  
83 # Store all passed input name pairs in the object
84 $self->set(@_);
85  
86 # Setup a hash of default parameters
87 my $defaultParms = {
88 Name => $::REQUIRED,
89 To => undef,
90 Cc => undef,
91 Bcc => undef,
92 From => undef,
93 Subject => "VBServer_$::HOST",
94 MessagePrefix => undef,
95 Smtp => undef,
96 Timeout => 20,
97 SendUrl => undef,
98 LimitToEvery => '10 min',
99 SubActionList => undef,
100 LogActionFlag => undef,
101 };
102  
103 # Run a validation on the passed parms, using the default parms
104 $self->validateParms($defaultParms) || &fatal("Exiting");
105  
106 # Now call the parents 'new' method
107 $self->SUPER::new() || &fatal("Exiting");
108  
109 ($self);
110 }
111  
112 1;
113 __END__