Branch Coverage

blib/lib/WWW/Challonge/Tournament.pm
Criterion Covered Total %
branch 73 106 68.8


line true false branch
74 1 4 unless $$self{'alive'}
77 1 3 unless defined $args
86 0 2 unless __args_are_valid($args)
96 0 2 if $response->is_error
118 1 1 unless $$self{'alive'}
130 0 1 if $response->is_error
168 1 3 unless $$self{'alive'}
183 1 2 if $response->is_error
215 1 1 unless $$self{'alive'}
231 0 1 if $response->is_error
251 1 1 unless $$self{'alive'}
267 0 1 if $response->is_error
286 1 1 unless $$self{'alive'}
302 0 1 if $response->is_error
321 1 1 unless $$self{'alive'}
337 0 1 if $response->is_error
487 1 6 unless $$self{'alive'}
500 0 6 if $response->is_error
525 1 1 unless $$self{'alive'}
538 0 1 if $response->is_error
565 1 3 unless $$self{'alive'}
568 1 2 unless defined $participant
581 1 1 if $response->is_error
640 1 15 unless $$self{'alive'}
649 2 0 unless (defined $$args{'name'} or defined $$args{'challonge_username'} or defined $$args{'email'})
658 0 13 unless WWW::Challonge::Participant::__args_are_valid($args)
668 3 10 if $response->is_error
694 1 3 unless $$self{'alive'}
707 0 3 if $response->is_error
734 1 3 unless $$self{'alive'}
737 1 2 unless defined $match
750 1 1 if $response->is_error
828 117 23 unless defined $$args{$arg}
831 12 11 if ($arg =~ /^name$/) { }
0 11 elsif ($arg =~ /^tournament_type$/) { }
11 0 elsif ($arg =~ /^url$/) { }
0 0 elsif ($arg =~ /^ranked_by$/) { }
833 0 12 if (length $$args{$arg} > 60)
840 0 0 unless ($$args{$arg} =~ /^((single|double) elimination)|(round robin)|\n\t\t\t\t(swiss)$/i)
849 0 11 unless ($$args{$arg} =~ /^[a-zA-Z0-9_]*$/)
856 0 0 unless ($$args{$arg} =~ /^((match|game) wins)|\n\t\t\t\t(points (scored|difference))|custom/i)
866 53 5 unless defined $$args{$arg}
868 1 4 unless ($$args{$arg} =~ /^\d*$/)
876 171 0 unless defined $$args{$arg}
878 0 0 if (not $$args{$arg} =~ /^\d*\.?\d*$/) { }
890 0 0 unless defined $$args{$arg}
892 0 0 unless ($$args{$arg} =~ /^(true|false)$/i)
900 9 10 unless defined $$args{$arg}
903 10 0 unless eval { do { $$args{$arg}->isa('DateTime') } }
906 0 10 if ($at) { }
0 10 elsif (not $$args{$arg} =~ / ^\d{4}- # The year, mandatory in all cases (?: (?: \d{2}-\d{2} # Month and day (?: T\d{2}:\d{2}:\d{2} # Hours, minutes, seconds (?: (?: \+\d{2}:\d{2} # Timezone ) | (?: Z # UTC ) ) )? ) | (?: W\d{2} # Week (?: -\d # Date with week number )? ) | (?: \d{3} # Ordinal date ) ) $ /x) { }
963 37 338 if ($arg eq $valid_arg)
969 0 37 unless $is_valid