Skip Menu |

This queue is for tickets about the POE-Component-AI-MegaHAL CPAN distribution.

Report information
The Basics
Id: 37894
Status: resolved
Worked: 10 min
Priority: 0/
Queue: POE-Component-AI-MegaHAL

People
Owner: BINGOS [...] cpan.org
Requestors: hinrik.sig [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Support for AI::MegaHAL's learn().
The subject line says it all. Also, you seem to have forgotten to do "svn add Changes examples/synopsis.pl" :)
Subject: learn.diff
Index: lib/POE/Component/AI/MegaHAL.pm =================================================================== --- lib/POE/Component/AI/MegaHAL.pm (revision 19) +++ lib/POE/Component/AI/MegaHAL.pm (working copy) @@ -24,6 +24,7 @@ do_reply => '_megahal_function', initial_greeting => '_megahal_function', _cleanup => '_megahal_function', + learn => '_megahal_function', }, $self => [ qw(_child_closed _child_error _child_stderr _child_stdout _start shutdown _sig_chld) ], ], @@ -59,7 +60,7 @@ } - return if $state eq 'do_reply' and !defined $args->{text}; + return if ($state eq 'do_reply' || $state eq 'learn') and !defined $args->{text}; delete $args->{text} if $state eq 'initial_greeting' and defined $args->{text}; @@ -250,6 +251,11 @@ Submits text to the brain and solicits a reply. In the hashref you must specify 'text' with the data you wish to submit to the L<AI::MegaHAL> object. +=item learn + +Submits text to the brain B<without> soliciting a reply. +In the hashref you must specify 'text' with the data you wish to submit to the L<AI::MegaHAL> object. + =item _cleanup Saves the megahal brain to file.
According to my records this was applied as of version 1.16 1.16 Thu Jul 24 11:27:48 BST 2008 - Added 'learn' as per RT #37894 Cheers.