File Coverage

lib/POEST/Config.pm
Criterion Covered Total %
statement 6 19 31.5
branch 0 2 0.0
condition n/a
subroutine 2 6 33.3
pod 4 4 100.0
total 12 31 38.7


line stmt bran cond sub pod time code
1             # $Id: Config.pm,v 1.3 2003/04/08 00:27:30 cwest Exp $
2             package POEST::Config;
3              
4 1     1   7708 use strict;
  1         3  
  1         229  
5             $^W = 1;
6              
7 1     1   7 use vars qw[$VERSION];
  1         2  
  1         444  
8             $VERSION = (qw$Revision: 1.3 $)[1];
9              
10             sub new {
11 0     0 1   my ($class, %args) = @_;
12            
13 0           return bless \%args, $class;
14             }
15              
16             sub config {
17 0     0 1   my ($self) = @_;
18              
19 0           return $self;
20             }
21              
22             sub get {
23 0     0 1   my ($self, @configs) = @_;
24              
25 0           my %conf = ();
26 0           foreach ( @configs ) {
27 0 0         $conf{$_} = $self->{$_} if exists $self->{$_};
28             }
29              
30 0           return \%conf;
31             }
32              
33             sub set {
34 0     0 1   my ($self, %set) = @_;
35            
36 0           my @keys = keys %set;
37            
38 0           @{$self}{@keys} = @set{@keys};
  0            
39             }
40              
41             1;
42              
43             __END__