ASP4/ConfigNode/System.pm

filter: Statementstmt 100% 26 / 26 Branchbran 50.0% 4 / 8 Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 9 / 9 Podpod 83.3% 5 / 6 totaltotal 86.5% 45 / 52 CC 6 SCAR 5.6
CC
6
Cov
86%
env_vars
2.1
settings
2.1
libs
2.0
CRAP 1.7
« ASP4/SessionStateManager/NonPersisted.pm ↑ Summary ASP4/ConfigLoader.pm »
1  
2 package ASP4::ConfigNode::System;
3  
4 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use warnings 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use base 'ASP4::ConfigNode';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8  
9 sub new
10 {
11 3 ▶ my $class = shift;
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
12
13 3 my $s = $class->SUPER::new( @_ );
14
15 3 return $s;
16 }# end new()
17  
18  
19 sub libs
20 {
21 3 ▶ my $s = shift;
Subroutine libs: called CC=2 SCAR=7.1
Pod documented
22
23 3 ▶ @{ $s->{libs} || [ ] };
Branch: 1 branch
BranchTrueFalseTotal
$s->{"libs"} or [] 0 3 3
24 }# end libs()
25  
26  
27 sub load_modules
28 {
29 3 ▶ my $s = shift;
Subroutine load_modules: called CC=2 SCAR=7.1
Pod documented
30
31 3 ▶ @{ $s->{load_modules} || [ ] };
Branch: 1 branch
BranchTrueFalseTotal
$s->{"load_modules"} or [] 0 3 3
32 }# end load_modules()
33  
34  
35 sub env_vars
36 {
37 4 ▶ my $s = shift;
Subroutine env_vars: called CC=2 SCAR=7.2
Pod documented
38
39 4 ▶ $s->{env_vars} || { };
Branch: 1 branch
BranchTrueFalseTotal
$s->{"env_vars"} or {} 0 4 4
40 }# end env_vars()
41  
42  
43 sub post_processors
44 {
45 3 ▶ my $s = shift;
Subroutine post_processors: called CC=2 SCAR=7.1
Pod documented
46
47 3 ▶ @{ $s->{post_processors} || [ ] };
Branch: 1 branch
BranchTrueFalseTotal
$s->{"post_processors"} or [] 0 3 3
48 }# end post_processors()
49  
50  
51 sub settings
52 {
53 1 ▶ my $s = shift;
Subroutine settings: called CC=2 SCAR=7.2
Pod documented
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 3 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://www.devstack.com/> 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  
« ASP4/SessionStateManager/NonPersisted.pm ↑ Summary ASP4/ConfigLoader.pm »