Branch Coverage

blib/lib/SVG/Calendar.pm
Criterion Covered Total %
branch 61 108 56.4


line true false branch
83 0 3 if ($self->{'calendar_height'} > 1)
196 15 5 ref $self->{'page'} ? :
199 2 18 if ($page)
200 0 0 $page eq 'A6' ? :
0 0 $page eq 'A5' ? :
1 0 $page eq 'A4' ? :
1 1 $page eq 'A3' ? :
0 2 $page eq 'A2' ? :
0 2 $page eq 'A1' ? :
0 2 $page eq 'A0' ? :
211 15 0 if (ref $self->{'page'} and $self->{'page'}{'width'})
214 15 0 if (ref $self->{'page'} and $self->{'page'}{'height'})
221 0 20 unless $width
226 0 20 unless $height
230 5 15 unless (ref $self->{'page'})
252 0 1 unless $start
254 0 1 if ($end) { }
283 0 13 unless $month and $month =~ /\A\d{4}-\d{2}\Z/msx
302 65 401 $wday == 1 ? :
304 0 466 if ($self->{'moon'}{'radius'})
309 397 69 $date->month == $month_day->month ? :
310 397 69 if ($date->month == $month_day->month)
314 0 466 if ($self->{'moon'} and $self->{'moon'}{'display'})
328 65 401 if ($wday == $ONE_WEEK)
331 13 453 if ($row > $MAX_WEEK_ROW)
338 13 453 if $wrap and $date->month != $month_day->month
342 0 0 if ($self->{'image'} and $self->{'image'}{'src'} || $self->{'image'}{$month})
349 0 0 if (-f $image)
351 0 0 if ($info->{'ImageHeight'} and $info->{'ImageWidth'}) { }
360 0 0 if ($image_scale < $page_scale) { }
385 0 14 if ($self->{'path'})
392 0 14 if $self->{'verbose'}
394 0 14 unless $tmpl->process('calendar.svg', $template, \$text)
397 12 2 if ($file)
398 0 12 if ($file eq '-') { }
399 0 0 unless print $text
402 0 12 unless open $fh, '>', $file
404 0 12 unless print {$fh;} $text
406 0 12 unless close $fh
408 0 12 if (-f $file and $self->{'inkscape'})
409 0 0 if ($self->{'inkscape'}{'pdf'})
412 0 0 if ($self->{'inkscape'}{'print'})
443 1 30 if ($phase < $error or 6.2831853071795862 - $error < $phase) { }
1 29 elsif (3.1415926535897931 - $error < $phase and $phase < 3.1415926535897931 + $error) { }
16 13 elsif ($phase < 3.1415926535897931) { }
13 0 elsif ($phase > 3.1415926535897931) { }
449 0 1 $self->{'full_moon'}++ ? :
507 93 0 unless (&blessed($date) and $date->isa('DateTime'))
511 0 93 unless ($date)
516 1 92 unless ($self->{'moon_phase'})
525 1 0 unless ($SVG::Calendar::EVAL_ERROR)
532 0 1 unless ($self->{'moon_phase'})
539 62 31 if ($self->{'moon_phase'} eq 'Astro::Coord::ECI::Moon') { }
31 0 elsif ($self->{'moon_phase'} eq 'Astro::MoonPhase') { }