Branch Coverage

blib/lib/Finance/Quote.pm
Criterion Covered Total %
branch 61 162 37.6


line true false branch
137 0 0 if (exists $Finance::Quote::METHODS{$name})
141 0 0 ref $_[0] ? :
172 0 0 unless $new_currency
178 0 0 unless $currency = $$info{join $;, $stock, "currency"}
181 0 0 if $currency eq $new_currency
185 0 0 unless (exists $conversion{join $;, $currency, $new_currency})
192 0 0 unless ($conversion{join $;, $currency, $new_currency})
208 0 0 unless defined $$info{join $;, $stock, $field}
246 260 468 unless (defined $Finance::Quote::MODULES{$modpath})
268 0 260 if $@
285 0 675 if (ref $val1 eq 'ARRAY') { }
286 0 0 if (ref $val2 eq 'Regexp') { }
296 504 171 if (ref $val2 eq 'Regexp') { }
324 1 0 wantarray ? :
360 9 48 if ($modpath->can("parameters"))
414 14 0 if (not $ENV{'FQ_CURRENCY'}) { }
417 0 0 if (grep /^$ENV{'FQ_CURRENCY'}$/, @Finance::Quote::CURRENCY_RATES_MODULES) { }
427 2 12 if defined $Finance::Quote::TIMEOUT
441 5 0 if (exists $named_parameter{$_[$i]}) { }
0 0 elsif ($i + 1 < @_ and ref $_[$i + 1] eq 'HASH') { }
0 0 elsif ($_[$i] eq '-defaults') { }
442 0 5 if $i + 1 == @_
443 0 5 if ref $_[$i + 1] ne $named_parameter{$_[$i]}[0]
461 0 14 if ($ENV{'FQ_LOAD_QUOTELET'} and not @load_modules) { }
14 0 elsif (@load_modules == 0) { }
463 0 0 if ($load_modules[0] eq "-defaults")
478 0 18 unless (defined $currency_check{$method})
486 0 18 exists $this->{'currency_rates'}{lc $method} ? :
488 2 16 unless defined $rate
493 2 16 if ($@)
523 0 0 unless @required
525 0 0 unless exists $available{$required[$i]}
554 4 0 if ($str =~ s/B$//i)
573 14 5 $str =~ s/(?:^0)?\.(.*)/$1/ ? :
578 12 7 if ($shift >= 0) { }
596 0 0 ref $_[0] ? :
601 0 0 unless (exists $Finance::Quote::METHODS{$method})
623 0 0 unless $this->_require_test(@{$$methodinfo{"labels"};})
629 0 0 unless $returnhash{join $;, $stock, "success"}
635 0 0 unless $this->{'FAILOVER'}
636 0 0 unless @failed_stocks
640 0 0 wantarray ? :
666 1 1 if $this->{'UserAgent'}
670 0 1 if ($Finance::Quote::USE_EXPERIMENTAL_UA) { }
676 1 0 if defined $this->{'TIMEOUT'}
689 11 0 if ($timeString =~ /^(\d+)[\.:UH](\d+) *(AM|am|PM|pm)?/)
691 0 2 if $hours == 12 and $3 and $3 =~ /AM/i
692 3 4 if $3 and $3 =~ /PM/i and $hours != 12
693 10 1 if ($hours >= 0 and $hours <= 23 and $mins >= 0 and $mins <= 59)
767 3 0 if (defined $piecesref->{'isodate'} and $piecesref->{'isodate'})
768 0 3 if ($piecesref->{'isodate'} =~ /^([0-9]{4})([0-9]{2})([0-9]{2})$/) { }
775 0 3 if $year < 100
781 3 0 if (defined $piecesref->{'usdate'} and $piecesref->{'usdate'})
783 0 3 if $year < 100
789 3 0 if (defined $piecesref->{'eurodate'} and $piecesref->{'eurodate'})
791 0 3 if $year < 100
797 1 12 if (defined $piecesref->{'year'})
799 1 0 if $year < 100
805 3 10 if (defined $piecesref->{'month'})
811 3 10 if (defined $piecesref->{'day'})
817 8 5 if $month =~ /\D/
818 2 11 if $year_specified == 0 and $this_month < $month
840 0 1 if ref $_[0]
846 0 1 unless $chunks[$i] =~ /\d/
863 0 0 ref $_[0] ? :
866 0 0 unless $from_code and $to_code
874 0 0 if $from_code eq $to_code
883 0 0 unless defined $from and defined $to
894 0 0 if ($delta > abs $to - $from)
899 0 0 if ($delta > abs $amount * $to - $from)
908 0 0 if ($@)
936 0 6 ref $_[0] ? :
944 1 6 unless (exists $attributes{$key})
964 0 0 if ref $_[0]
975 0 0 if substr($text, -1, 1) eq ","
987 0 0 if ref $_[0]
998 0 0 if substr($text, -1, 1) eq ";"
1038 0 0 if (@_ == 1 or not ref $_[0])
1044 0 0 if (defined $_[0])
1058 0 0 if (@_ == 1 or not ref $_[0])
1086 0 0 if defined $value