~ubuntu-branches/ubuntu/vivid/librivescript-perl/vivid

« back to all changes in this revision

Viewing changes to docs/RiveScript.html

  • Committer: Package Import Robot
  • Author(s): gregor herrmann
  • Date: 2012-08-25 21:21:27 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20120825212127-phm6b84x4grhbnfg
Tags: 1.28-1
* New upstream release.
* Drop spelling-errors.patch, merged upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
        </ul>
31
31
 
32
32
        <li><a href="#rivescript">RIVESCRIPT</a></li>
 
33
        <li><a href="#constants">CONSTANTS</a></li>
33
34
        <li><a href="#see_also">SEE ALSO</a></li>
34
35
        <li><a href="#changes">CHANGES</a></li>
35
36
        <li><a href="#author">AUTHOR</a></li>
409
410
<p>
410
411
</p>
411
412
<hr />
 
413
<h1><a name="constants">CONSTANTS</a></h1>
 
414
<p>This module can export some constants.</p>
 
415
<pre>
 
416
  use RiveScript qw(:standard);</pre>
 
417
<p>These constants include:</p>
 
418
<dl>
 
419
<dt><strong><a name="rs_err_match" class="item">RS_ERR_MATCH</a></strong></dt>
 
420
 
 
421
<dd>
 
422
<p>This is the reply text given when no trigger has matched the message. It equals
 
423
&quot;<code>ERR: No Reply Matched</code>&quot;.</p>
 
424
<pre>
 
425
  if ($reply eq RS_ERR_MATCH) {
 
426
    $reply = &quot;I couldn't find a good reply for you!&quot;;
 
427
  }</pre>
 
428
</dd>
 
429
<dt><strong><a name="rs_err_reply" class="item">RS_ERR_REPLY</a></strong></dt>
 
430
 
 
431
<dd>
 
432
<p>This is the reply text given when a trigger <em>was</em> matched, but no reply was
 
433
given from it (for example, the trigger only had conditionals and all of them
 
434
were false, with no default replies to fall back on). It equals
 
435
&quot;<code>ERR: No Reply Found</code>&quot;.</p>
 
436
<pre>
 
437
  if ($reply eq RS_ERR_REPLY) {
 
438
    $reply = &quot;I don't know what to say about that!&quot;;
 
439
  }</pre>
 
440
</dd>
 
441
</dl>
 
442
<p>
 
443
</p>
 
444
<hr />
412
445
<h1><a name="see_also">SEE ALSO</a></h1>
413
446
<p><a href="/RiveScript/WD.html">the RiveScript::WD manpage</a> - A current snapshot of the Working Draft that
414
447
defines the standards of RiveScript.</p>
418
451
<hr />
419
452
<h1><a name="changes">CHANGES</a></h1>
420
453
<pre>
 
454
  1.28  Aug 14 2012
 
455
  - FIXED: Typos in RiveScript::WD (Bug #77618)
 
456
  - Added constants RS_ERR_MATCH and RS_ERR_REPLY.</pre>
 
457
<pre>
 
458
  1.26  May 29 2012
 
459
  - Added EXE_FILES to Makefile.PL so the rivescript utility installs
 
460
    correctly.</pre>
 
461
<pre>
421
462
  1.24  May 15 2012
422
463
  - Fixed: having a single-line, multiline comment, e.g. /* ... */
423
464
  - Fixed: you can use &lt;input&gt; and &lt;reply&gt; in triggers now, instead of only