1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221
|
Description: spelling fix: inheritence -> inheritance
Origin: vendor
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2016-10-31
Forwarded: https://rt.cpan.org/Ticket/Display.html?id=118572
Bug: https://rt.cpan.org/Ticket/Display.html?id=118572
--- a/README.md
+++ b/README.md
@@ -181,7 +181,7 @@
"include" => { # topic inclusion
"alpha" => [ "beta", "gamma" ], # > topic alpha includes beta gamma
},
- "inherit" => { # topic inheritence
+ "inherit" => { # topic inheritance
"alpha" => [ "delta" ], # > topic alpha inherits delta
}
}
--- a/docs/RiveScript-WD.html
+++ b/docs/RiveScript-WD.html
@@ -398,7 +398,7 @@
<p>When a topic inherits another topic, it means that the entire collection of triggers of the source topic <i>and</i> any included topics, will have a higher matching priority than the inherited topics.</p>
-<p>See <a href="#Sorting-Triggers">"Sorting +Triggers"</a> to see how triggers are sorted internally. The following example shows how includes and inheritence works:</p>
+<p>See <a href="#Sorting-Triggers">"Sorting +Triggers"</a> to see how triggers are sorted internally. The following example shows how includes and inheritance works:</p>
<pre><code> // This is in the default "random" topic and catches all non-matching
// triggers.
@@ -430,7 +430,7 @@
<p>These are all normal topics. Alpha, beta, and gamma all have a single trigger corresponding to their topic names. If the user were put into one of these topics, this is the only trigger available. Anything else would give them a "NO REPLY" error message. They are unable to match the <code>*</code> trigger at the top, because that trigger belongs to the "<code>random</code>" topic, and they're not in that topic.</p>
-<p>Now let's see how we can pair these topics up with includes and inheritence.</p>
+<p>Now let's see how we can pair these topics up with includes and inheritance.</p>
<pre><code> > topic ab includes alpha
+ hello bot
--- a/docs/RiveScript.html
+++ b/docs/RiveScript.html
@@ -202,7 +202,7 @@
"include" => { # topic inclusion
"alpha" => [ "beta", "gamma" ], # > topic alpha includes beta gamma
},
- "inherit" => { # topic inheritence
+ "inherit" => { # topic inheritance
"alpha" => [ "delta" ], # > topic alpha inherits delta
}
}</code></pre>
--- a/lib/RiveScript.pm
+++ b/lib/RiveScript.pm
@@ -1091,7 +1091,7 @@
# values mean higher priority on the stack. Keep this in mind when
# keeping track of how to sort these things.
my $inherits = -1; # -1 means no {inherits} tag, for flexibility
- my $highest_inherits = -1; # highest inheritence # we've seen
+ my $highest_inherits = -1; # highest inheritance # we've seen
# Loop through and categorize these triggers.
my $track = {
@@ -1123,7 +1123,7 @@
$inherits = -1;
}
- # If this is the first time we've seen this inheritence priority
+ # If this is the first time we've seen this inheritance priority
# level, initialize its structure.
if (!exists $track->{$inherits}) {
$track->{$inherits} = {
@@ -1430,7 +1430,7 @@
return 1;
}
-# Given one topic, walk the inheritence tree and return an array of all topics.
+# Given one topic, walk the inheritance tree and return an array of all topics.
sub _getTopicTree {
my ($self,$topic,$depth) = @_;
@@ -1472,7 +1472,7 @@
# Gather an array of all triggers in a topic. If the topic inherits other
# topics, recursively collect those triggers too. Take care about recursion.
sub _topicTriggers {
- my ($self,$topic,$triglvl,$depth,$inheritence,$inherited) = @_;
+ my ($self,$topic,$triglvl,$depth,$inheritance,$inherited) = @_;
# Break if we're in too deep.
if ($depth > $self->{depth}) {
@@ -1480,9 +1480,9 @@
return ();
}
- # Important info about the depth vs inheritence params to this function:
+ # Important info about the depth vs inheritance params to this function:
# depth increments by 1 every time this function recursively calls itself.
- # inheritence increments by 1 only when this topic inherits another topic.
+ # inheritance increments by 1 only when this topic inherits another topic.
#
# This way, `> topic alpha includes beta inherits gamma` will have this effect:
# alpha and beta's triggers are combined together into one matching pool, and then
@@ -1492,7 +1492,7 @@
# inherits other topics. This forces the {inherits} tag to be added to the
# triggers. This only applies when the top topic "includes" another topic.
- $self->debug ("\tCollecting trigger list for topic $topic (depth=$depth; inheritence=$inheritence; inherited=$inherited)");
+ $self->debug ("\tCollecting trigger list for topic $topic (depth=$depth; inheritance=$inheritance; inherited=$inherited)");
# topic: the name of the topic
# triglvl: either $self->{topics} or $self->{thats}
@@ -1506,7 +1506,7 @@
# Check every included topic.
foreach my $includes (sort { $a cmp $b } keys %{$self->{includes}->{$topic}}) {
$self->debug ("\t\tTopic $topic includes $includes");
- push (@triggers, $self->_topicTriggers($includes,$triglvl,($depth + 1), $inheritence, 1));
+ push (@triggers, $self->_topicTriggers($includes,$triglvl,($depth + 1), $inheritance, 1));
}
}
@@ -1515,7 +1515,7 @@
# Check every inherited topic.
foreach my $inherits (sort { $a cmp $b } keys %{$self->{lineage}->{$topic}}) {
$self->debug ("\t\tTopic $topic inherits $inherits");
- push (@triggers, $self->_topicTriggers($inherits,$triglvl,($depth + 1), ($inheritence + 1), 0));
+ push (@triggers, $self->_topicTriggers($inherits,$triglvl,($depth + 1), ($inheritance + 1), 0));
}
}
@@ -1525,8 +1525,8 @@
if (exists $self->{lineage}->{$topic} || $inherited) {
my @inThisTopic = keys %{$triglvl->{$topic}};
foreach my $trigger (@inThisTopic) {
- $self->debug ("\t\tPrefixing trigger with {inherits=$inheritence}$trigger");
- push (@triggers, "{inherits=$inheritence}$trigger");
+ $self->debug ("\t\tPrefixing trigger with {inherits=$inheritance}$trigger");
+ push (@triggers, "{inherits=$inheritance}$trigger");
}
}
else {
@@ -1590,7 +1590,7 @@
"include" => { # topic inclusion
"alpha" => [ "beta", "gamma" ], # > topic alpha includes beta gamma
},
- "inherit" => { # topic inheritence
+ "inherit" => { # topic inheritance
"alpha" => [ "delta" ], # > topic alpha inherits delta
}
}
@@ -2645,7 +2645,7 @@
$matched = $self->{topics}->{$topic}->{$trig};
}
else {
- # Our topic doesn't have this trigger. Check inheritence.
+ # Our topic doesn't have this trigger. Check inheritance.
$matched = $self->_findTriggerByInheritence ($topic,$trig,0);
}
@@ -2801,11 +2801,11 @@
# sorted array, but the trigger doesn't exist under the topic of
# which the user currently belongs. It probably was a trigger
# inherited/included from another topic. This subroutine finds that out,
- # recursively, following the inheritence trail.
+ # recursively, following the inheritance trail.
# Take care to prevent infinite recursion.
if ($depth > $self->{depth}) {
- $self->issue("Deep recursion detected while following an inheritence trail (involving topic $topic and trigger $trig)");
+ $self->issue("Deep recursion detected while following an inheritance trail (involving topic $topic and trigger $trig)");
return undef;
}
--- a/lib/RiveScript/WD.pm
+++ b/lib/RiveScript/WD.pm
@@ -364,7 +364,7 @@
higher matching priority than the inherited topics.
See L<"Sorting +Triggers"> to see how triggers are sorted internally. The
-following example shows how includes and inheritence works:
+following example shows how includes and inheritance works:
// This is in the default "random" topic and catches all non-matching
// triggers.
@@ -402,7 +402,7 @@
topic, and they're not in that topic.
Now let's see how we can pair these topics up with includes and
-inheritence.
+inheritance.
> topic ab includes alpha
+ hello bot
--- a/lib/RiveScript/demo/rpg.rive
+++ b/lib/RiveScript/demo/rpg.rive
@@ -1,6 +1,6 @@
! version = 2.00
-// This file tests topic inclusions and inheritence:
+// This file tests topic inclusions and inheritance:
//
// includes: this means that the topic "includes" the triggers present
// in another topic. Matching triggers in the source and included
--- a/t/RiveScript.t
+++ b/t/RiveScript.t
@@ -568,7 +568,7 @@
};
push @tests, sub {
- # Topic inheritence.
+ # Topic inheritance.
my $rs = bot('
> topic colors
+ what color is the sky
--- a/testsuite.rive
+++ b/testsuite.rive
@@ -600,7 +600,7 @@
+ about this game
% what do you need a hint *
- - This is just a sample RPG game to demonstrate topic inheritence.
+ - This is just a sample RPG game to demonstrate topic inheritance.
< topic
> topic room1 inherits dungeon
|