File Coverage

example/SampleConfig.pm
Criterion Covered Total %
statement 9 28 32.1
branch n/a
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 12 33 36.3


line stmt bran cond sub pod time code
1             #### Edit this line to be the Filename, without the ".pm"
2              
3             package SampleConfig;
4              
5             #### Perl setup -- you don't need to edit this part ####
6 1     1   3170 use warnings;
  1         12  
  1         38  
7 1     1   5 use strict;
  1         2  
  1         35  
8 1     1   6 use Exporter;
  1         2  
  1         881  
9             our @ISA = qw(Exporter);
10             sub new {
11 0     0 0   my $pkg = shift;
12 0           my %config = ();
13              
14             #################### Edit below here!!! ########################
15              
16             # Below are sample config variables. Not all of them are used with
17             # every application. You can add more to suit your application.
18              
19             ## Paths and URLs
20             # Where to find files
21 0           $config{'basedir'} = "/home/web/myApp";
22 0           $config{'templatedir'} = "$config{basedir}/tmpls";
23 0           $config{'cgidir'} = "$config{basedir}/cgi";
24 0           $config{'htmldir'} = "$config{basedir}/html";
25 0           $config{'libdir'} = "$config{basedir}/lib";
26 0           $config{'sqldir'} = "$config{libdir}/sql";
27              
28             # Where to find links
29 0           $config{'baseurl'} = "http://www.clotho.com/myApp";
30 0           $config{'cgiurl'} = "$config{baseurl}/cgi";
31 0           $config{'htmlurl'} = "$config{baseurl}/html";
32              
33              
34             ## Mail delivery
35             # If this is set, then the getEmailTemplate() method will send
36             # direct SMTP mail via this host instead of employing the default
37             # sendmail binary program (i.e. CAM::EmailTemplate::SMTP
38             # vs. CAM::EmailTemplate)
39             #$config{'mailhost'} = "mail.foo.com";
40              
41              
42             ## Database configuration
43             # How to find the database
44 0           $config{'dbname'} = "clotho";
45 0           $config{'dbusername'} = "clotho";
46 0           $config{'dbpassword'} = "clotho";
47 0           $config{'dbhost'} = "localhost";
48              
49             # optionally, specify the string manually. This is checked before
50             # 'dbname' and 'dbhost'
51             #$config{'dbistr'} = "DBI:mysql:database=clotho";
52              
53              
54             ## CAM::Session setup
55             # What to call our session cookie
56 0           $config{'cookiename'} = "clotho";
57              
58             # How long until the session expires? (server side session, not
59             # cookie duration!)
60 0           $config{'sessiontime'} = 2*60*60; # seconds
61              
62             # What database table stores the session data?
63 0           $config{'sessiontable'} = "session";
64              
65              
66             #################### Edit above here!!! ########################
67              
68 0           return bless(\%config,$pkg);
69             }
70             #### Leave this here -- .pm files must end with a "1;" ####
71             1;