| 1 | package App::SmokeBrew::IniFile; | ||||||||||||||||||||||||||||||||
| 2 | 4 | $App::SmokeBrew::IniFile::VERSION = '1.06'; | |||||||||||||||||||||||||||||||
| 3 | #ABSTRACT: Parse the smokebrew configuration file | ||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||
| 5 | 4 | ▶ | use strict; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 6 | 4 | ▶ | use warnings; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 7 | 4 | ▶ | use base 'Config::INI::Reader'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||
| 9 | 12 | ▶ | sub set_value { | ||||||||||||||||||||||||||||||
|
Subroutine
set_value: called CC=4 SCAR=15.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 10 | 12 | my ($self, $name, $value) = @_; | |||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||
| 12 | 12 | ▶ | if ( defined $self->{data}{ $self->current_section }{$name} | ||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition66%2/3
defined $self->{"data"}{$self->current_section}{$name} and ref $self->{"data"}{$self->current_section}{$name} eq "ARRAY"
MC/DC0%0/2
defined $self->{"data"}{$self->current_section}{$name} and ref $self->{"data"}{$self->current_section}{$name} eq "ARRAY"
defined $self->{"data"}{$self->current_section}{$name}
ref $self->{"data"}{$self->current_section}{$name} eq "ARRAY"
Truth table66%2/3
A and B
A= defined $self->{"data"}{$self->current_section}{$name}B= ref $self->{"data"}{$self->current_section}{$name} eq "ARRAY"
| |||||||||||||||||||||||||||||||||
| 13 | and ref $self->{data}{ $self->current_section }{$name} eq 'ARRAY' ) { | ||||||||||||||||||||||||||||||||
| 14 | 0 | push @{ $self->{data}{ $self->current_section }{$name} }, $value; | |||||||||||||||||||||||||||||||
| 15 | } | ||||||||||||||||||||||||||||||||
| 16 | elsif ( defined $self->{data}{ $self->current_section }{$name} ) { | ||||||||||||||||||||||||||||||||
| 17 | $self->{data}{ $self->current_section }{$name} | ||||||||||||||||||||||||||||||||
| 18 | 2 | = [ $self->{data}{ $self->current_section }{$name}, $value ]; | |||||||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||||||
| 20 | else { | ||||||||||||||||||||||||||||||||
| 21 | 10 | $self->{data}{ $self->current_section }{$name} = $value; | |||||||||||||||||||||||||||||||
| 22 | } | ||||||||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||
| 25 | 4 | qq[Smokin']; | |||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||
| 27 | __END__ | ||||||||||||||||||||||||||||||||