Branch Coverage

blib/lib/FTN/Outbound/BSO.pm
Criterion Covered Total %
branch 33 208 15.8


line true false branch
139 0 2 if ref(my $class = shift())
142 0 2 unless @_
144 0 2 if @_ % 2
155 0 2 unless exists $option{'outbound_root'}
160 0 2 unless (-e $outbound_root_fs)
168 0 2 unless (-d _)
181 0 2 if (exists $option{'our_addr'} and $option{'our_addr'}) { }
184 0 0 if (ref $option{'our_addr'} and &Scalar::Util::blessed($option{'our_addr'}) and $option{'our_addr'}->isa('FTN::Addr')) { }
193 0 0 unless $self{'our_addr'} = 'FTN::Addr'->new($option{'our_addr'})
200 0 2 unless exists $option{'domain'} and $option{'domain'}
205 0 2 unless $option{'domain'} =~ /^[a-z\d_~-]{1,8}$/
209 0 2 unless exists $option{'zone'} and $option{'zone'}
216 0 2 unless $option{'zone'} =~ /^\d+$/ and 1 <= $option{'zone'} and $option{'zone'} <= 32767
223 2 0 if (exists $option{'domain_abbrev'} and defined $option{'domain_abbrev'} and ref $option{'domain_abbrev'} eq 'HASH') { }
230 0 2 unless exists $option{'domain_abbrev'}{$self{'domain'}}
238 0 2 if (exists $option{'reference_file_read_line_transform_sub'})
241 0 0 unless defined $option{'reference_file_read_line_transform_sub'} and 'CODE' eq ref $option{'reference_file_read_line_transform_sub'}
247 0 2 if (exists $option{'maximum_session_time'})
255 0 0 defined $option{'maximum_session_time'} ? :
0 0 unless defined $option{'maximum_session_time'} and $option{'maximum_session_time'} =~ /^\d+$/ and $option{'maximum_session_time'}
266 0 0 unless ref(my $self = shift())
282 0 0 if (exists $ext_netmail_flavour{$lc_ext}) { }
0 0 elsif (exists $ext_reference_file_flavour{$lc_ext}) { }
0 0 elsif (exists $ext_control_file{$lc_ext}) { }
288 0 0 if ($file_prop->{'size'} and exists $self->{'reference_file_read_line_transform_sub'})
303 0 0 $file_prop->{'mstat'} ? :
304 0 0 if ($ext_control_file{$lc_ext} eq 'busy' and exists $self->{'maximum_session_time'} and $self->{'maximum_session_time'} * 2 < $age) { }
316 0 0 unless unlink &Encode::encode('locale_fs', $file_prop->{'full_name'})
338 0 0 unless ref(my $self = shift())
343 0 0 unless -e $self->{'outbound_root_fs'}
349 0 0 unless -d _
358 0 0 unless opendir my $or_dh, $self->{'outbound_root_fs'}
365 0 0 if '.' eq substr($dz_out, 0, 1)
374 0 0 unless -d $dir_name_fs
380 0 0 unless $dz_out =~ /^($domain_abbr_re)(?:\.([1-7]?[0-9a-f]{3}))?$/i and $1 eq $self->{'domain_abbrev'}{$self->{'domain'}} || defined $2
386 0 0 defined $2 ? :
389 0 0 unless 1 <= $zone and $zone <= 32767
400 0 0 unless opendir my $dz_dh, $dir_name_fs
410 0 0 unless $dir_entry =~ /^([0-9a-f]{4})([0-9a-f]{4})\.(.+)$/i
421 0 0 if (lc $ext eq 'pnt' and -d $full_name_fs) { }
0 0 elsif (-f $full_name_fs) { }
434 0 0 unless opendir my $p_dh, $full_name_fs
444 0 0 unless $file =~ /^([0-9a-f]{8})\.(.+)$/i
454 0 0 unless -f &Encode::encode('locale_fs', $full_name)
502 0 0 unless ref(my $self = shift())
505 0 0 unless exists $self->{'scanned'}
509 0 0 wantarray ? :
516 0 0 unless ref(my $self = shift())
520 0 0 unless defined $addr and ref $addr and &Scalar::Util::blessed($addr) and $addr->isa('FTN::Addr')
529 0 0 unless exists $self->{'domain_abbrev'}{$addr->domain}
543 0 0 unless ref(my $self = shift())
548 0 0 unless exists $self->{'scanned'}
556 0 0 if exists $self->{'scanned'}{$addr->domain}{$addr->zone}{$_}{$addr->net} and exists $self->{'scanned'}{$addr->domain}{$addr->zone}{$_}{$addr->net}{$addr->node} and exists $self->{'scanned'}{$addr->domain}{$addr->zone}{$_}{$addr->net}{$addr->node}{$addr->point}
0 0 if exists $self->{'scanned'}{$addr->domain} and exists $self->{'scanned'}{$addr->domain}{$addr->zone}
563 0 15 unless ref(my $self = shift())
571 0 15 unless exists $self->{'domain_abbrev'}{$domain}
577 7 8 unless $domain eq $self->{'domain'} and $zone == $self->{'zone'}
580 0 15 unless exists $self->{'scanned'}
582 15 0 if (exists $self->{'scanned'}{$domain} and exists $self->{'scanned'}{$domain}{$zone} and $domain ne $self->{'domain'} || $zone != $self->{'zone'} || grep((length $_ == length $best_match), keys %{$$self{'scanned'}{$domain}{$zone};})) { }
590 0 3 unless length $a <=> length $b
597 11 4 defined $t ? :
611 0 0 unless mkdir &Encode::encode('locale_fs', $dir_full_name)
626 0 9 unless ref(my $self = shift())
637 0 9 unless exists $self->{'domain_abbrev'}{$domain}
655 9 0 if (@dz_out_with_existing_points_dir) { }
657 7 2 unless (grep(($_ eq $dz_out), @dz_out_with_existing_points_dir))
663 5 2 defined $t ? :
670 4 5 unless exists $self->{'scanned'}{$domain}{$zone}{$dz_out}{$net}{$node}{'points_dir'}{$points_dir}
685 0 0 unless mkdir &Encode::encode('locale_fs', $dir_full_name)
715 0 0 unless ref(my $self = shift())
719 0 0 unless @_ and defined $_[0] and 'CODE' eq ref $_[0]
727 0 0 unless exists $self->{'scanned'}
738 0 0 if ($addr->point) { }
764 0 0 unless sysopen my $fh, $busy_name_fs, 193
770 0 0 unless flock $fh, 2
790 0 0 unless unlink $busy_name_fs
796 0 0 if ($@)
829 0 0 unless ref(my $self = shift())
837 0 0 unless @_
842 0 0 defined $type ? :
0 0 unless defined $type and grep(($type eq $_), @flavoured, keys %control_file_extension)
850 0 0 $addr->point ? :
859 0 0 if ($flavoured) { }
860 0 0 unless @_
869 0 0 defined $flavour ? :
0 0 unless defined $flavour and exists $flavour_extension{$flavour}
873 0 0 $type eq $flavoured[0] ? :
880 0 0 if (@_)
881 0 0 unless defined $_[0] and 'CODE' eq ref $_[0]
890 0 0 unless exists $self->{'scanned'}
908 0 0 if (@dz_out_with_existing_file) { }
909 0 0 unless (grep(($dz_out eq $_), @dz_out_with_existing_file))
916 0 0 if $flavoured
923 0 0 $t ? :
929 0 0 if $flavoured
934 0 0 unless grep(($filename eq $_->{'name'}), @$r)
950 0 0 $addr->point ? :
954 0 0 if ($sub_ref)
959 0 0 if ($@)
970 0 0 if $flavoured
974 0 0 if defined $record_idx
980 0 0 if (-e &Encode::encode('locale_fs', $full_filename))
983 0 0 if $flavoured
1001 0 0 if $type eq 'reference_file' and $file_prop{'size'} and exists $self->{'reference_file_read_line_transform_sub'}