AI-CleverbotIO
view release on metacpan or search on metacpan
);
# call to create() is mostly safe, you might get an error
# back but still 200 OK. You can avoid this (and wasting one
# API call) if you know the nick is already active for these
# API credentials.
$cleverbot->create();
# then, it's just... ask()
my $answer = $cleverbot->ask('Hello darling!');
say $answer->{response};
DESCRIPTION
This module allows you to interact with the API served by
https://cleverbot.io.
ACCESSORS
key
field in the answer will contain an error about the fact that the nick
already exists (Error: reference name already exists). You can safely
ignore this error.
You can optionally pass a different other_nick. This will be set as
"nick" and used for creation (this will overwrite whatever "nick"
contains though).
has_nick
say $obj->nick if $obj->has_nick;
say 'no nick yet' unless $obj->has_nick;
Predicate to check whether a "nick" is already set or not.
BUGS AND LIMITATIONS
Report bugs either through RT or GitHub (patches welcome).
SEE ALSO
https://cleverbot.io.
lib/AI/CleverbotIO.pod view on Meta::CPAN
);
# call to create() is mostly safe, you might get an error
# back but still 200 OK. You can avoid this (and wasting one
# API call) if you know the nick is already active for these
# API credentials.
$cleverbot->create();
# then, it's just... ask()
my $answer = $cleverbot->ask('Hello darling!');
say $answer->{response};
=head1 DESCRIPTION
This module allows you to interact with the API served by
L<https://cleverbot.io>.
=head1 ACCESSORS
=head2 key
lib/AI/CleverbotIO.pod view on Meta::CPAN
field in the answer will contain an error about the fact that the nick
already exists (C<Error: reference name already exists>). You can safely
ignore this error.
You can optionally pass a different C<other_nick>. This will be set as
L</nick> and used for creation (this will overwrite whatever L</nick>
contains though).
=head2 has_nick
say $obj->nick if $obj->has_nick;
say 'no nick yet' unless $obj->has_nick;
Predicate to check whether a L</nick> is already set or not.
=head1 BUGS AND LIMITATIONS
Report bugs either through RT or GitHub (patches welcome).
=head1 SEE ALSO
L<https://cleverbot.io>.
( run in 1.987 second using v1.01-cache-2.11-cpan-5b529ec07f3 )