Codebase list librivescript-perl / 2d27ef14-baef-441a-9a5e-195c18257ef8/main
Refresh patches. Debian Janitor 2 years ago
1 changed file(s) with 48 addition(s) and 32 deletion(s). Raw diff Collapse all Expand all
44 Forwarded: https://rt.cpan.org/Ticket/Display.html?id=118572
55 Bug: https://rt.cpan.org/Ticket/Display.html?id=118572
66
7 --- a/README.md
8 +++ b/README.md
9 @@ -181,7 +181,7 @@
7 Index: librivescript-perl/README.md
8 ===================================================================
9 --- librivescript-perl.orig/README.md
10 +++ librivescript-perl/README.md
11 @@ -181,7 +181,7 @@ http://www.rivescript.com/
1012 "include" => { # topic inclusion
1113 "alpha" => [ "beta", "gamma" ], # > topic alpha includes beta gamma
1214 },
1517 "alpha" => [ "delta" ], # > topic alpha inherits delta
1618 }
1719 }
18 --- a/docs/RiveScript-WD.html
19 +++ b/docs/RiveScript-WD.html
20 Index: librivescript-perl/docs/RiveScript-WD.html
21 ===================================================================
22 --- librivescript-perl.orig/docs/RiveScript-WD.html
23 +++ librivescript-perl/docs/RiveScript-WD.html
2024 @@ -398,7 +398,7 @@
2125
2226 <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>
3539
3640 <pre><code> &gt; topic ab includes alpha
3741 + hello bot
38 --- a/docs/RiveScript.html
39 +++ b/docs/RiveScript.html
42 Index: librivescript-perl/docs/RiveScript.html
43 ===================================================================
44 --- librivescript-perl.orig/docs/RiveScript.html
45 +++ librivescript-perl/docs/RiveScript.html
4046 @@ -202,7 +202,7 @@
4147 &quot;include&quot; =&gt; { # topic inclusion
4248 &quot;alpha&quot; =&gt; [ &quot;beta&quot;, &quot;gamma&quot; ], # &gt; topic alpha includes beta gamma
4652 &quot;alpha&quot; =&gt; [ &quot;delta&quot; ], # &gt; topic alpha inherits delta
4753 }
4854 }</code></pre>
49 --- a/lib/RiveScript.pm
50 +++ b/lib/RiveScript.pm
51 @@ -1091,7 +1091,7 @@
55 Index: librivescript-perl/lib/RiveScript.pm
56 ===================================================================
57 --- librivescript-perl.orig/lib/RiveScript.pm
58 +++ librivescript-perl/lib/RiveScript.pm
59 @@ -1091,7 +1091,7 @@ sub sortReplies {
5260 # values mean higher priority on the stack. Keep this in mind when
5361 # keeping track of how to sort these things.
5462 my $inherits = -1; # -1 means no {inherits} tag, for flexibility
5765
5866 # Loop through and categorize these triggers.
5967 my $track = {
60 @@ -1123,7 +1123,7 @@
68 @@ -1123,7 +1123,7 @@ sub sortReplies {
6169 $inherits = -1;
6270 }
6371
6674 # level, initialize its structure.
6775 if (!exists $track->{$inherits}) {
6876 $track->{$inherits} = {
69 @@ -1430,7 +1430,7 @@
77 @@ -1430,7 +1430,7 @@ sub sortList {
7078 return 1;
7179 }
7280
7583 sub _getTopicTree {
7684 my ($self,$topic,$depth) = @_;
7785
78 @@ -1472,7 +1472,7 @@
86 @@ -1472,7 +1472,7 @@ sub _getTopicTree {
7987 # Gather an array of all triggers in a topic. If the topic inherits other
8088 # topics, recursively collect those triggers too. Take care about recursion.
8189 sub _topicTriggers {
8492
8593 # Break if we're in too deep.
8694 if ($depth > $self->{depth}) {
87 @@ -1480,9 +1480,9 @@
95 @@ -1480,9 +1480,9 @@ sub _topicTriggers {
8896 return ();
8997 }
9098
96104 #
97105 # This way, `> topic alpha includes beta inherits gamma` will have this effect:
98106 # alpha and beta's triggers are combined together into one matching pool, and then
99 @@ -1492,7 +1492,7 @@
107 @@ -1492,7 +1492,7 @@ sub _topicTriggers {
100108 # inherits other topics. This forces the {inherits} tag to be added to the
101109 # triggers. This only applies when the top topic "includes" another topic.
102110
105113
106114 # topic: the name of the topic
107115 # triglvl: either $self->{topics} or $self->{thats}
108 @@ -1506,7 +1506,7 @@
116 @@ -1506,7 +1506,7 @@ sub _topicTriggers {
109117 # Check every included topic.
110118 foreach my $includes (sort { $a cmp $b } keys %{$self->{includes}->{$topic}}) {
111119 $self->debug ("\t\tTopic $topic includes $includes");
114122 }
115123 }
116124
117 @@ -1515,7 +1515,7 @@
125 @@ -1515,7 +1515,7 @@ sub _topicTriggers {
118126 # Check every inherited topic.
119127 foreach my $inherits (sort { $a cmp $b } keys %{$self->{lineage}->{$topic}}) {
120128 $self->debug ("\t\tTopic $topic inherits $inherits");
123131 }
124132 }
125133
126 @@ -1525,8 +1525,8 @@
134 @@ -1525,8 +1525,8 @@ sub _topicTriggers {
127135 if (exists $self->{lineage}->{$topic} || $inherited) {
128136 my @inThisTopic = keys %{$triglvl->{$topic}};
129137 foreach my $trigger (@inThisTopic) {
134142 }
135143 }
136144 else {
137 @@ -1590,7 +1590,7 @@
145 @@ -1590,7 +1590,7 @@ The data structure returned from this wi
138146 "include" => { # topic inclusion
139147 "alpha" => [ "beta", "gamma" ], # > topic alpha includes beta gamma
140148 },
143151 "alpha" => [ "delta" ], # > topic alpha inherits delta
144152 }
145153 }
146 @@ -2645,7 +2645,7 @@
154 @@ -2645,7 +2645,7 @@ sub _getreply {
147155 $matched = $self->{topics}->{$topic}->{$trig};
148156 }
149157 else {
152160 $matched = $self->_findTriggerByInheritence ($topic,$trig,0);
153161 }
154162
155 @@ -2801,11 +2801,11 @@
163 @@ -2801,11 +2801,11 @@ sub _findTriggerByInheritence {
156164 # sorted array, but the trigger doesn't exist under the topic of
157165 # which the user currently belongs. It probably was a trigger
158166 # inherited/included from another topic. This subroutine finds that out,
166174 return undef;
167175 }
168176
169 --- a/lib/RiveScript/WD.pm
170 +++ b/lib/RiveScript/WD.pm
171 @@ -364,7 +364,7 @@
177 Index: librivescript-perl/lib/RiveScript/WD.pm
178 ===================================================================
179 --- librivescript-perl.orig/lib/RiveScript/WD.pm
180 +++ librivescript-perl/lib/RiveScript/WD.pm
181 @@ -364,7 +364,7 @@ of triggers of the source topic I<and> a
172182 higher matching priority than the inherited topics.
173183
174184 See L<"Sorting +Triggers"> to see how triggers are sorted internally. The
177187
178188 // This is in the default "random" topic and catches all non-matching
179189 // triggers.
180 @@ -402,7 +402,7 @@
190 @@ -402,7 +402,7 @@ C<*> trigger at the top, because that tr
181191 topic, and they're not in that topic.
182192
183193 Now let's see how we can pair these topics up with includes and
186196
187197 > topic ab includes alpha
188198 + hello bot
189 --- a/lib/RiveScript/demo/rpg.rive
190 +++ b/lib/RiveScript/demo/rpg.rive
199 Index: librivescript-perl/lib/RiveScript/demo/rpg.rive
200 ===================================================================
201 --- librivescript-perl.orig/lib/RiveScript/demo/rpg.rive
202 +++ librivescript-perl/lib/RiveScript/demo/rpg.rive
191203 @@ -1,6 +1,6 @@
192204 ! version = 2.00
193205
196208 //
197209 // includes: this means that the topic "includes" the triggers present
198210 // in another topic. Matching triggers in the source and included
199 --- a/t/RiveScript.t
200 +++ b/t/RiveScript.t
201 @@ -568,7 +568,7 @@
211 Index: librivescript-perl/t/RiveScript.t
212 ===================================================================
213 --- librivescript-perl.orig/t/RiveScript.t
214 +++ librivescript-perl/t/RiveScript.t
215 @@ -568,7 +568,7 @@ push @tests, sub {
202216 };
203217
204218 push @tests, sub {
207221 my $rs = bot('
208222 > topic colors
209223 + what color is the sky
210 --- a/testsuite.rive
211 +++ b/testsuite.rive
224 Index: librivescript-perl/testsuite.rive
225 ===================================================================
226 --- librivescript-perl.orig/testsuite.rive
227 +++ librivescript-perl/testsuite.rive
212228 @@ -600,7 +600,7 @@
213229
214230 + about this game