blib/lib/ASP4/ConfigNode/System.pm

filter: Statementstmt 100% 26 / 26 Branchbran 50.0% 1 / 2 Conditioncond 50.0% 4 / 8 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 100% 9 / 9 Podpod 83.3% 5 / 6 totaltotal 81.8% 45 / 55 CC 6 SCAR 5.6
CC
6
Cov
86%
env_vars
2.1
settings
2.1
libs
2.0
CRAP 1.7
« blib/lib/ASP4/SessionStateManager/InMemory.pm ↑ Summary blib/lib/ASP4/Page.pm »
1  
2 package ASP4::ConfigNode::System;
3  
4 15 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 15 ▶use warnings 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 15 ▶use base 'ASP4::ConfigNode';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8  
9 sub new
10 15 ▶{
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
11 15 my $class = shift;
12
13 15 my $s = $class->SUPER::new( @_ );
14
15 15 return $s;
16 }# end new()
17  
18  
19 sub libs
20 5160 ▶{
Subroutine libs: called CC=2 SCAR=7.1
Pod documented
21 5160 my $s = shift;
22
23 5160 ▶ @{ $s->{libs} || [ ] };
Condition50%1/2
$s->{'libs'} || []
l!l
51600
MC/DC0%0/1
$s->{'libs'} || []
$s->{'libs'}
Truth table50%1/2
A
A= $s->{'libs'}
Aresult
11
00
24 }# end libs()
25  
26  
27 sub load_modules
28 15 ▶{
Subroutine load_modules: called CC=2 SCAR=7.1
Pod documented
29 15 my $s = shift;
30
31 15 ▶ @{ $s->{load_modules} || [ ] };
Condition50%1/2
$s->{'load_modules'} || []
l!l
150
MC/DC0%0/1
$s->{'load_modules'} || []
$s->{'load_modules'}
Truth table50%1/2
A
A= $s->{'load_modules'}
Aresult
11
00
32 }# end load_modules()
33  
34  
35 sub env_vars
36 16 ▶{
Subroutine env_vars: called CC=2 SCAR=7.2
Pod documented
37 16 my $s = shift;
38
39 16 ▶ $s->{env_vars} || { };
Branch: 1 branch
BranchTrueFalseTotal
$s->{"env_vars"} or {} 16 0 16
40 }# end env_vars()
41  
42  
43 sub post_processors
44 15 ▶{
Subroutine post_processors: called CC=2 SCAR=7.1
Pod documented
45 15 my $s = shift;
46
47 15 ▶ @{ $s->{post_processors} || [ ] };
Condition50%1/2
$s->{'post_processors'} || []
l!l
150
MC/DC0%0/1
$s->{'post_processors'} || []
$s->{'post_processors'}
Truth table50%1/2
A
A= $s->{'post_processors'}
Aresult
11
00
48 }# end post_processors()
49  
50  
51 sub settings
52 1 ▶{
Subroutine settings: called CC=2 SCAR=7.2
Pod documented
53 1 my $s = shift;
54
55 1 ▶ return $s->{settings} || { };
Condition50%1/2
$s->{'settings'} || {}
l!l
10
MC/DC0%0/1
$s->{'settings'} || {}
$s->{'settings'}
Truth table50%1/2
A
A= $s->{'settings'}
Aresult
11
00
56 }# end settings()
57  
58 15 1;# return true:
59  
60 =pod
61  
62 =head1 NAME
63  
64 ASP4::ConfigNode::System - the 'system' portion of the config.
65  
66 =head1 SYNOPSIS
67  
68 my $system = $Config->system;
69  
70 =head1 DESCRIPTION
71  
72 This package provides special access to the elements specific to the C<system>
73 portion of the XML config file.
74  
75 =head1 PUBLIC PROPERTIES
76  
77 =head2 libs
78  
79 A list of library paths that should be included into C<@INC>.
80  
81 =head2 load_modules
82  
83 A list of Perl modules that should be loaded automatically.
84  
85 =head2 post_processors
86  
87 A list of L<ASP4::ConfigPostProcessor> modules that should be given the ability to alter the config before
88 it is considered "ready for use" by the rest of the application.
89  
90 =head2 env_vars
91  
92 A hash of C<%ENV> variables that should be set.
93  
94 =head2 settings
95  
96 A collection of special read-only values that should be available throughout the application.
97  
98 Examples include encryption keys, API keys and username/password combos to access remote services.
99  
100 =head1 BUGS
101  
102 It's possible that some bugs have found their way into this release.
103  
104 Use RT L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=ASP4> to submit bug reports.
105  
106 =head1 HOMEPAGE
107  
108 Please visit the ASP4 homepage at L<http://0x31337.org/code/> to see examples
109 of ASP4 in action.
110
111 =head1 AUTHOR
112
113 John Drago <jdrago_999@yahoo.com>
114
115 =head1 COPYRIGHT AND LICENSE
116
117 Copyright 2007 John Drago, All rights reserved.
118
119 This software is free software. It may be used and distributed under the
120 same terms as Perl itself.
121
122 =cut
123  
124  
« blib/lib/ASP4/SessionStateManager/InMemory.pm ↑ Summary blib/lib/ASP4/Page.pm »