Branch Coverage

blib/lib/Chatbot/Eliza.pm
Criterion Covered Total %
branch 36 88 40.9


line true false branch
354 0 1 if (defined $param1 and ref $param1 eq 'HASH') { }
363 1 0 if $param1
380 0 53 unless (exists $self->{'_permitted'}{$field})
384 25 28 if (@_) { }
433 0 0 if $self->prompts_on
445 0 0 if $self->prompts_on
453 0 0 if ($self->_testquit($user_input))
455 0 0 if $self->prompts_on
462 0 0 if ($user_input eq 'debug')
470 0 0 if ($user_input eq 'memory' or $user_input eq 'debug memory')
478 0 0 if ($user_input eq 'debug that')
490 0 0 if $self->debug
493 0 0 if $self->prompts_on
531 0 0 if ($wordsin[$i] =~ /\b$keyword\b/i)
567 0 0 if ($wordsin[$i] =~ /\b$keyword\b/i)
596 0 0 if $string =~ /\b$quitword\b/i
687 0 4 if $use_memory
719 3 9 if ($string_part =~ /\b$keyword\b/i || $keyword eq $goto and $rank < $self->{'keyranks'}{$keyword})
742 0 3 if ($this_decomp =~ /\@/)
753 3 0 if ($string_part =~ /$this_decomp()()()()()()()()()()/i)
778 0 3 if ($reasmb =~ /^goto\s(\w*).*/i)
842 1 3 if ($reasmb eq '') { }
3 0 elsif ($self->memory_on) { }
851 0 1 if ($#{$self->memory;} >= 0 and &{$self->{'myrand'};}(1) >= 1 - $self->likelihood_of_using_memory) { }
872 0 3 if ($#{$$self{'reasmblist_for_memory'}{$reasmbkey};} >= 0 and not defined $use_memory)
883 0 3 if $#{$self->memory;} >= $self->max_memory_size
909 0 3 $memory ? :
912 0 3 if ($next_reasmb > scalar @these_reasmbs)
1035 1 0 if ($scriptfile) { }
1039 0 1 unless open SCRIPTFILE, "<$scriptfile"
1066 0 9 if /^\s*#/ or /^\s*$/
1074 0 9 if (/quit/)
1075 0 9 if (/initial/)
1076 0 9 if (/final/)
1078 3 6 if (/decomp/)
1079 0 3 if $thiskey eq ''
1086 3 3 if (/reasmb/)
1087 0 3 if $thisdecomp eq ''
1093 0 3 if (/reasm_for_memory/)
1094 0 0 if $thisdecomp eq ''
1107 0 3 if (/pre/)
1108 0 3 if (/post/)
1111 0 3 if (/synon/)
1113 3 0 if (/key/)