Branch Coverage

blib/lib/Catalyst/Wizard.pm
Criterion Covered Total %
branch 58 150 38.6


line true false branch
151 0 7 if DEBUG2()
153 0 7 if DEBUG2()
157 3 4 if ($my_wizard_id and $my_wizard_id ne 'new') { }
164 0 3 unless $self
168 0 3 if defined $step
187 0 7 if DEBUG2()
210 0 19 if ($$flags{-'last'} and @$args)
214 0 0 if ($$flags{-'skip'} and @$new_steps and not exists $$new_steps[-1]{'skip'})
245 0 18 if DEBUG2()
254 0 18 if DEBUG2()
273 1 18 if ($$flags{-'last'})
277 0 19 if ($$flags{-'skip'})
281 13 6 if ($step eq '-forward' or $step eq '-detach') { }
1 5 elsif ($step eq '-sub' or $step eq '-subfixed') { }
5 0 elsif ($step eq '-redirect' or not $step =~ /^-/) { }
0 0 elsif ($step =~ /-(.*)/) { }
286 1 12 if (ref $step_args eq 'ARRAY')
290 1 12 ref $step_args ? :
304 0 1 $step_type =~ /fixed/o ? :
313 3 2 if ($step eq '-redirect') { }
330 0 0 unless $self->can($step_type)
332 0 0 unless $self->$step_type(\@args, $step_ref, $flags)
340 0 19 if DEBUG2()
342 13 6 if ($self->_is_force_add_step(\@args, \@new_steps, $step_ref, $flags) or not exists $$self{'steps_already_in_wizard'}{$$step_ref{'hash'}})
362 17 1 unless $$check_for_last_step{'last'}
368 0 1 if exists $$self{'have_last_step'}
383 0 18 if $$self{'step_number'} > @{$$self{'steps'};}
431 0 18 if $$self{'no_add_step'}
454 0 7 if (exists $$self{'step_back'} and $$self{'step_number'} > 0)
458 0 7 unless exists $$self{'steps'}[$$self{'step_number'}]
479 4 25 unless defined $shift
508 0 0 if ($$step{'path'} =~ m[^/?$path$])
511 0 0 unless $step_to_go
512 0 0 unless $step_to_go
518 0 0 if $other
543 0 0 if $step_number > $#{$$self{'steps'};}
549 0 0 if $$step{'step_type'} ne '-redirect'
569 0 4 if $_[0]{'die_for_goto'}
588 4 0 if $$self{'step_number'} <= $#{$$self{'steps'};}
607 0 0 unless $$self{'step_number'}
609 0 0 if ($path eq '-detach' or $path eq '-forward')
621 0 0 unless $found_in_passed
645 0 4 unless delete $$self{'goto'}
651 0 4 unless $step
653 1 3 if ($$step{'step_type'} eq '-detach' or $$step{'step_type'} eq '-forward')
662 1 2 if ($$step{'step_type'} eq '-sub')
757 3 0 if ($$options_ref{'append_wizard_id'})
763 0 3 if (exists $$options_ref{'append_to_uri'} and ref $$options_ref{'append_to_uri'} eq 'HASH')
792 0 0 if ($$self{'step_number'} + 1 == $step and $$self{'steps'}[$$self{'step_number'}]{'step_type'} eq '-redirect')
802 0 0 if ($$self{'step_number'} > $step and $$self{'steps'}[$step]{'step_type'} eq '-redirect')
804 0 0 if $$self{'no_step_back'}
836 3 0 if defined $add_steps
852 0 0 if ($$self{'steps'}[$$self{'step_number'}]{'uri_for_next'})
880 9 0 if (not exists $c->stash->{'wizard'} && keys %{$c->stash->{'wizard'};}) { }
0 0 elsif (keys %{{} unless $c->stash->{'wizard'};} and not keys %{$$self{'stash'};}) { }
881 0 0 unless $c->stash->{'wizard'}
913 0 5 if DEBUG2()
917 0 5 unless (@{$$self{'steps'};})
924 5 0 if ($c->can('wizard_storage'))
925 0 5 if DEBUG2()
930 0 0 if $$self{'loaded_from_storage'}
932 0 0 if DEBUG2()
936 0 0 if $$self{'expires'} <= time
956 3 0 if ($c->can('wizard_storage'))
957 0 3 if DEBUG2()
961 0 0 if DEBUG2()
965 0 0 if $$storage{$wid}{'expires'} > time
970 0 0 if (exists $$storage{$wizard_id})
982 0 1 unless ref $c
984 1 0 if ($c->can('wizard_storage'))
985 0 1 if DEBUG2()
990 0 0 if DEBUG2()
995 0 0 if defined $current
1036 0 0 if ref $self
1073 0 0 if ($step_type eq 'detach' or $step_type eq 'forward')