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