Branch Coverage

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


line true false branch
135 0 0 if (exists $Finance::Quote::METHODS{$name})
139 0 0 ref $_[0] ? :
170 0 0 unless $new_currency
176 0 0 unless $currency = $$info{join $;, $stock, "currency"}
179 0 0 if $currency eq $new_currency
183 0 0 unless (exists $conversion{join $;, $currency, $new_currency})
190 0 0 unless ($conversion{join $;, $currency, $new_currency})
206 0 0 unless defined $$info{join $;, $stock, $field}
244 250 450 unless (defined $Finance::Quote::MODULES{$modpath})
266 0 250 if $@
283 0 674 if (ref $val1 eq 'ARRAY') { }
284 0 0 if (ref $val2 eq 'Regexp') { }
294 504 170 if (ref $val2 eq 'Regexp') { }
322 1 0 wantarray ? :
358 9 46 if ($modpath->can("parameters"))
412 14 0 if (not $ENV{'FQ_CURRENCY'}) { }
415 0 0 if (grep /^$ENV{'FQ_CURRENCY'}$/, @Finance::Quote::CURRENCY_RATES_MODULES) { }
425 2 12 if defined $Finance::Quote::TIMEOUT
439 5 0 if (exists $named_parameter{$_[$i]}) { }
0 0 elsif ($i + 1 < @_ and ref $_[$i + 1] eq 'HASH') { }
0 0 elsif ($_[$i] eq '-defaults') { }
440 0 5 if $i + 1 == @_
441 0 5 if ref $_[$i + 1] ne $named_parameter{$_[$i]}[0]
459 0 14 if ($ENV{'FQ_LOAD_QUOTELET'} and not @load_modules) { }
14 0 elsif (@load_modules == 0) { }
461 0 0 if ($load_modules[0] eq "-defaults")
476 0 18 unless (defined $currency_check{$method})
484 0 18 exists $this->{'currency_rates'}{lc $method} ? :
486 2 16 unless defined $rate
491 2 16 if ($@)
521 0 0 unless @required
523 0 0 unless exists $available{$required[$i]}
552 4 0 if ($str =~ s/B$//i)
571 14 5 $str =~ s/(?:^0)?\.(.*)/$1/ ? :
576 12 7 if ($shift >= 0) { }
594 0 0 ref $_[0] ? :
599 0 0 unless (exists $Finance::Quote::METHODS{$method})
621 0 0 unless $this->_require_test(@{$$methodinfo{"labels"};})
627 0 0 unless $returnhash{join $;, $stock, "success"}
633 0 0 unless $this->{'FAILOVER'}
634 0 0 unless @failed_stocks
638 0 0 wantarray ? :
664 1 1 if $this->{'UserAgent'}
668 0 1 if ($Finance::Quote::USE_EXPERIMENTAL_UA) { }
674 1 0 if defined $this->{'TIMEOUT'}
687 11 0 if ($timeString =~ /^(\d+)[\.:UH](\d+) *(AM|am|PM|pm)?/)
689 0 2 if $hours == 12 and $3 and $3 =~ /AM/i
690 3 4 if $3 and $3 =~ /PM/i and $hours != 12
691 10 1 if ($hours >= 0 and $hours <= 23 and $mins >= 0 and $mins <= 59)
765 3 0 if (defined $piecesref->{'isodate'} and $piecesref->{'isodate'})
766 0 3 if ($piecesref->{'isodate'} =~ /^([0-9]{4})([0-9]{2})([0-9]{2})$/) { }
773 0 3 if $year < 100
779 3 0 if (defined $piecesref->{'usdate'} and $piecesref->{'usdate'})
781 0 3 if $year < 100
787 3 0 if (defined $piecesref->{'eurodate'} and $piecesref->{'eurodate'})
789 0 3 if $year < 100
795 1 12 if (defined $piecesref->{'year'})
797 1 0 if $year < 100
803 3 10 if (defined $piecesref->{'month'})
809 3 10 if (defined $piecesref->{'day'})
815 8 5 if $month =~ /\D/
816 2 11 if $year_specified == 0 and $this_month < $month
838 0 1 if ref $_[0]
844 0 1 unless $chunks[$i] =~ /\d/
861 0 0 ref $_[0] ? :
864 0 0 unless $from_code and $to_code
872 0 0 if $from_code eq $to_code
881 0 0 unless defined $from and defined $to
892 0 0 if ($delta > abs $to - $from)
897 0 0 if ($delta > abs $amount * $to - $from)
906 0 0 if ($@)
934 0 6 ref $_[0] ? :
942 1 6 unless (exists $attributes{$key})
962 0 0 if ref $_[0]
973 0 0 if substr($text, -1, 1) eq ","
985 0 0 if ref $_[0]
996 0 0 if substr($text, -1, 1) eq ";"
1036 0 0 if (@_ == 1 or not ref $_[0])
1042 0 0 if (defined $_[0])
1056 0 0 if (@_ == 1 or not ref $_[0])
1084 0 0 if defined $value