Branch Coverage

blib/lib/HH/Unispool/Config.pm
Criterion Covered Total %
branch 128 226 56.6


line true false branch
580 0 5 if (ref $file) { }
581 0 0 unless $file->isa('IO::Handle')
587 0 5 unless defined $fh
601 0 5 unless &UNIVERSAL::isa($ch, 'HH::Unispool::Config::File::Token::Comment::Head')
611 0 5 unless &UNIVERSAL::isa($cd, 'HH::Unispool::Config::File::Token::Comment::Date')
620 0 5 unless &UNIVERSAL::isa($tcs, 'HH::Unispool::Config::File::Token::Comment::Scope')
630 5 0 if ($tcs->get_scope->exists_scope('_Server_'))
634 0 5 unless &UNIVERSAL::isa($csc, 'HH::Unispool::Config::File::Token::Comment::Cs')
641 0 5 unless &UNIVERSAL::isa($csrv, 'HH::Unispool::Config::File::Token::Unnumbered::Cs')
650 5 5 unless ($bsrv->isa('HH::Unispool::Config::File::Token::Unnumbered::Bcs'))
657 0 5 if $bsrv->get_hostname eq $cs
661 0 5 if exists $bcs{$bsrv->get_hostname}
669 0 5 if (scalar keys %bcs > 7)
677 5 0 if ($tcs->get_scope->exists_scope('_Script_'))
681 0 5 unless &UNIVERSAL::isa($csc, 'HH::Unispool::Config::File::Token::Comment::Filter')
695 5 10 unless ($tok->isa('HH::Unispool::Config::File::Token::Unnumbered::Filter'))
707 0 10 if exists $filter{$name}
715 0 5 unless scalar %filter
723 0 0 if ($tcs->get_scope->exists_scope('_Network_') or $tcs->get_scope->exists_scope('_Local_') or $tcs->get_scope->exists_scope('System=*'))
736 5 15 unless ($tok->isa('HH::Unispool::Config::File::Token::Comment::Misc'))
748 5 10 if ($name eq '_Network_') { }
0 10 elsif ($name eq '_Local_') { }
0 10 elsif (not $tcs->get_scope->exists_scope('System=*')) { }
0 10 elsif (exists $system{$name}) { }
749 0 5 unless $tcs->get_scope->exists_scope('_Network_')
753 0 0 unless $tcs->get_scope->exists_scope('_Local_')
768 5 0 if ($tcs->get_scope->exists_scope('_Server_'))
770 0 5 unless exists $system{$cs}
775 0 5 unless exists $system{$bcs}
781 5 10 if ($system{$system}->get_name eq $cs) { }
5 5 elsif (exists $bcs{$system{$system}->get_name}) { }
800 0 5 unless &UNIVERSAL::isa($ct, 'HH::Unispool::Config::File::Token::Comment::Tail')
804 0 5 if ($ch->get_host ne $ct->get_host)
857 18 3 defined $_[0] ? :
860 0 21 unless ref $opt eq 'HASH'
863 0 21 exists $$opt{'diff_host'} ? :
866 0 21 exists $$opt{'diff_number'} ? :
869 0 21 exists $$opt{'diff_time'} ? :
872 0 21 exists $$opt{'diff_version'} ? :
875 5 16 if (exists $$opt{'filter'}) { }
876 0 5 unless ref $$opt{'filter'} eq 'ARRAY'
884 16 5 unless (exists $$opt{'host'})
892 18 3 exists $$opt{'scope'} ? :
895 5 16 if (exists $$opt{'system'}) { }
896 0 5 unless ref $$opt{'system'} eq 'ARRAY'
904 5 16 exists $$opt{'time'} ? :
907 5 16 exists $$opt{'version'} ? :
917 16 0 unless scalar @pw
935 0 0 unless (exists $ALLOW_ISA{$name} or exists $ALLOW_REF{$name} or exists $ALLOW_RX{$name} or exists $ALLOW_VALUE{$name})
943 69 63 if (ref $val and exists $ALLOW_ISA{$name})
945 69 0 if &UNIVERSAL::isa($val, $class)
950 0 63 if (ref $val and exists $ALLOW_REF{$name})
951 0 0 if exists $ALLOW_REF{$name}{ref $val}
955 63 0 if (defined $val and not ref $val and exists $ALLOW_RX{$name})
957 63 0 if $val =~ /$rx/
962 0 0 if (not ref $val and exists $ALLOW_VALUE{$name})
963 0 0 if exists $ALLOW_VALUE{$name}{$val}
978 0 4 unless &_value_is_allowed('filter', @_)
990 0 19 unless &_value_is_allowed('system', @_)
1017 0 1 unless exists $$self{'HH_Unispool_Config'}{'system'}{$val}
1029 0 2 if (ref $from ne ref $to)
1040 0 2 if ($from->is_diff_version and $from->get_version ne $to->get_version)
1048 0 2 if ($from->is_diff_host and $from->get_host ne $to->get_host)
1055 0 2 if ($from->is_diff_time and $from->get_time ne $to->get_time)
1066 0 2 if $scope_diff
1069 2 0 if ($from->get_scope->exists_scope('_Script_'))
1071 0 4 unless ($to->exists_filter($name))
1079 0 4 unless ($from->exists_filter($name))
1087 0 0 if ($from->get_scope->exists_scope('_Network_') or $from->get_scope->exists_scope('_Local_') or $from->get_scope->exists_scope('System=*'))
1091 1 5 unless ($to->exists_system($name))
1101 0 5 if ($rf ne $rt)
1108 0 5 unless ($from->exists_system($name))
1168 0 2 if ($$self{'HH_Unispool_Config'}{'diff_host'}) { }
1190 0 2 if ($$self{'HH_Unispool_Config'}{'diff_time'}) { }
1201 0 2 if ($$self{'HH_Unispool_Config'}{'diff_version'}) { }
1226 0 21 if (shift()) { }
1237 0 21 if (shift()) { }
1248 0 21 if (shift()) { }
1259 0 21 if (shift()) { }
1271 0 21 unless &_value_is_allowed('filter', @_)
1287 0 21 unless defined $val
1290 0 21 unless &_value_is_allowed('host', $val)
1301 0 21 unless defined $val
1304 0 21 unless &_value_is_allowed('scope', $val)
1314 0 21 unless &_value_is_allowed('system', @_)
1330 0 21 unless defined $val
1333 0 21 unless &_value_is_allowed('time', $val)
1344 0 21 unless defined $val
1347 0 21 unless &_value_is_allowed('version', $val)
1356 16 0 if (scalar @_) { }
1359 16 0 if exists $$self{'HH_Unispool_Config'}{'filter'}{$key}
1372 35 5 if (scalar @_) { }
1375 35 0 if exists $$self{'HH_Unispool_Config'}{'system'}{$key}
1393 0 18 if (ref $file) { }
1394 0 0 unless $file->isa('IO::Handle')
1400 0 18 unless defined $fh
1434 5 13 if ($self->get_scope->exists_scope('_Server_'))
1440 5 7 if (defined $system->get_type and $system->get_type eq 'cs') { }
2 5 elsif ($system->get_type eq 'bcs') { }
1441 0 5 if (defined $cs)
1454 0 5 unless (defined $cs)
1459 0 5 if (scalar keys %bcs > 7)
1496 5 13 if ($self->get_scope->exists_scope('_Script_'))
1520 5 13 if ($self->get_scope->exists_scope('_Network_')) { }
1521 0 5 unless $self->exists_system('_Network_')
1527 0 13 if $self->exists_system('_Network_')
1532 13 5 if ($self->get_scope->exists_scope('_Local_')) { }
1533 0 13 unless $self->exists_system('_Local_')
1539 0 5 if $self->exists_system('_Local_')
1544 5 13 if ($self->get_scope->exists_scope('System=*'))
1548 5 7 if $name eq '_Network_'
1549 0 7 if $name eq '_Local_'
1559 0 5 unless $count