Branch Coverage

blib/lib/Chatbot/Eliza.pm
Criterion Covered Total %
branch 35 86 40.7


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)
768 0 3 if (defined $use_memory and $#{$$self{'reasmblist_for_memory'}{$reasmbkey};} >= 0) { }
790 0 3 if ($reasmb =~ /^goto\s(\w*).*/i)
854 1 3 if ($reasmb eq '') { }
3 0 elsif ($self->memory_on) { }
863 0 1 if ($#{$self->memory;} >= 0 and &{$self->{'myrand'};}(1) >= 1 - $self->likelihood_of_using_memory) { }
884 0 3 if ($#{$$self{'reasmblist_for_memory'}{$reasmbkey};} >= 0 and not defined $use_memory)
895 0 3 if $#{$self->memory;} >= $self->max_memory_size
1028 1 0 if ($scriptfile) { }
1032 0 1 unless open SCRIPTFILE, "<$scriptfile"
1059 0 9 if /^\s*#/ or /^\s*$/
1067 0 9 if (/quit/)
1068 0 9 if (/initial/)
1069 0 9 if (/final/)
1071 3 6 if (/decomp/)
1072 0 3 if $thiskey eq ''
1079 3 3 if (/reasmb/)
1080 0 3 if $thisdecomp eq ''
1086 0 3 if (/reasm_for_memory/)
1087 0 0 if $thisdecomp eq ''
1100 0 3 if (/pre/)
1101 0 3 if (/post/)
1104 0 3 if (/synon/)
1106 3 0 if (/key/)