Refresh patches.
Debian Janitor
2 years ago
4 | 4 | Forwarded: https://rt.cpan.org/Ticket/Display.html?id=118572 |
5 | 5 | Bug: https://rt.cpan.org/Ticket/Display.html?id=118572 |
6 | 6 | |
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/ | |
10 | 12 | "include" => { # topic inclusion |
11 | 13 | "alpha" => [ "beta", "gamma" ], # > topic alpha includes beta gamma |
12 | 14 | }, |
15 | 17 | "alpha" => [ "delta" ], # > topic alpha inherits delta |
16 | 18 | } |
17 | 19 | } |
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 | |
20 | 24 | @@ -398,7 +398,7 @@ |
21 | 25 | |
22 | 26 | <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> |
35 | 39 | |
36 | 40 | <pre><code> > topic ab includes alpha |
37 | 41 | + 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 | |
40 | 46 | @@ -202,7 +202,7 @@ |
41 | 47 | "include" => { # topic inclusion |
42 | 48 | "alpha" => [ "beta", "gamma" ], # > topic alpha includes beta gamma |
46 | 52 | "alpha" => [ "delta" ], # > topic alpha inherits delta |
47 | 53 | } |
48 | 54 | }</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 { | |
52 | 60 | # values mean higher priority on the stack. Keep this in mind when |
53 | 61 | # keeping track of how to sort these things. |
54 | 62 | my $inherits = -1; # -1 means no {inherits} tag, for flexibility |
57 | 65 | |
58 | 66 | # Loop through and categorize these triggers. |
59 | 67 | my $track = { |
60 | @@ -1123,7 +1123,7 @@ | |
68 | @@ -1123,7 +1123,7 @@ sub sortReplies { | |
61 | 69 | $inherits = -1; |
62 | 70 | } |
63 | 71 | |
66 | 74 | # level, initialize its structure. |
67 | 75 | if (!exists $track->{$inherits}) { |
68 | 76 | $track->{$inherits} = { |
69 | @@ -1430,7 +1430,7 @@ | |
77 | @@ -1430,7 +1430,7 @@ sub sortList { | |
70 | 78 | return 1; |
71 | 79 | } |
72 | 80 | |
75 | 83 | sub _getTopicTree { |
76 | 84 | my ($self,$topic,$depth) = @_; |
77 | 85 | |
78 | @@ -1472,7 +1472,7 @@ | |
86 | @@ -1472,7 +1472,7 @@ sub _getTopicTree { | |
79 | 87 | # Gather an array of all triggers in a topic. If the topic inherits other |
80 | 88 | # topics, recursively collect those triggers too. Take care about recursion. |
81 | 89 | sub _topicTriggers { |
84 | 92 | |
85 | 93 | # Break if we're in too deep. |
86 | 94 | if ($depth > $self->{depth}) { |
87 | @@ -1480,9 +1480,9 @@ | |
95 | @@ -1480,9 +1480,9 @@ sub _topicTriggers { | |
88 | 96 | return (); |
89 | 97 | } |
90 | 98 | |
96 | 104 | # |
97 | 105 | # This way, `> topic alpha includes beta inherits gamma` will have this effect: |
98 | 106 | # 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 { | |
100 | 108 | # inherits other topics. This forces the {inherits} tag to be added to the |
101 | 109 | # triggers. This only applies when the top topic "includes" another topic. |
102 | 110 | |
105 | 113 | |
106 | 114 | # topic: the name of the topic |
107 | 115 | # triglvl: either $self->{topics} or $self->{thats} |
108 | @@ -1506,7 +1506,7 @@ | |
116 | @@ -1506,7 +1506,7 @@ sub _topicTriggers { | |
109 | 117 | # Check every included topic. |
110 | 118 | foreach my $includes (sort { $a cmp $b } keys %{$self->{includes}->{$topic}}) { |
111 | 119 | $self->debug ("\t\tTopic $topic includes $includes"); |
114 | 122 | } |
115 | 123 | } |
116 | 124 | |
117 | @@ -1515,7 +1515,7 @@ | |
125 | @@ -1515,7 +1515,7 @@ sub _topicTriggers { | |
118 | 126 | # Check every inherited topic. |
119 | 127 | foreach my $inherits (sort { $a cmp $b } keys %{$self->{lineage}->{$topic}}) { |
120 | 128 | $self->debug ("\t\tTopic $topic inherits $inherits"); |
123 | 131 | } |
124 | 132 | } |
125 | 133 | |
126 | @@ -1525,8 +1525,8 @@ | |
134 | @@ -1525,8 +1525,8 @@ sub _topicTriggers { | |
127 | 135 | if (exists $self->{lineage}->{$topic} || $inherited) { |
128 | 136 | my @inThisTopic = keys %{$triglvl->{$topic}}; |
129 | 137 | foreach my $trigger (@inThisTopic) { |
134 | 142 | } |
135 | 143 | } |
136 | 144 | else { |
137 | @@ -1590,7 +1590,7 @@ | |
145 | @@ -1590,7 +1590,7 @@ The data structure returned from this wi | |
138 | 146 | "include" => { # topic inclusion |
139 | 147 | "alpha" => [ "beta", "gamma" ], # > topic alpha includes beta gamma |
140 | 148 | }, |
143 | 151 | "alpha" => [ "delta" ], # > topic alpha inherits delta |
144 | 152 | } |
145 | 153 | } |
146 | @@ -2645,7 +2645,7 @@ | |
154 | @@ -2645,7 +2645,7 @@ sub _getreply { | |
147 | 155 | $matched = $self->{topics}->{$topic}->{$trig}; |
148 | 156 | } |
149 | 157 | else { |
152 | 160 | $matched = $self->_findTriggerByInheritence ($topic,$trig,0); |
153 | 161 | } |
154 | 162 | |
155 | @@ -2801,11 +2801,11 @@ | |
163 | @@ -2801,11 +2801,11 @@ sub _findTriggerByInheritence { | |
156 | 164 | # sorted array, but the trigger doesn't exist under the topic of |
157 | 165 | # which the user currently belongs. It probably was a trigger |
158 | 166 | # inherited/included from another topic. This subroutine finds that out, |
166 | 174 | return undef; |
167 | 175 | } |
168 | 176 | |
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 | |
172 | 182 | higher matching priority than the inherited topics. |
173 | 183 | |
174 | 184 | See L<"Sorting +Triggers"> to see how triggers are sorted internally. The |
177 | 187 | |
178 | 188 | // This is in the default "random" topic and catches all non-matching |
179 | 189 | // triggers. |
180 | @@ -402,7 +402,7 @@ | |
190 | @@ -402,7 +402,7 @@ C<*> trigger at the top, because that tr | |
181 | 191 | topic, and they're not in that topic. |
182 | 192 | |
183 | 193 | Now let's see how we can pair these topics up with includes and |
186 | 196 | |
187 | 197 | > topic ab includes alpha |
188 | 198 | + 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 | |
191 | 203 | @@ -1,6 +1,6 @@ |
192 | 204 | ! version = 2.00 |
193 | 205 | |
196 | 208 | // |
197 | 209 | // includes: this means that the topic "includes" the triggers present |
198 | 210 | // 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 { | |
202 | 216 | }; |
203 | 217 | |
204 | 218 | push @tests, sub { |
207 | 221 | my $rs = bot(' |
208 | 222 | > topic colors |
209 | 223 | + 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 | |
212 | 228 | @@ -600,7 +600,7 @@ |
213 | 229 | |
214 | 230 | + about this game |