Parse::Colloquy::Bot - Parse Colloquy bot/client terminal output
use strict; use Parse::Colloquy::Bot qw(:all); use Data::Dumper; # ... connect to Colloquy and read from the server ... my $parsed = parse_line($raw_input); print Dumper($parsed);
This module will parse the raw "client" or "bot" terminal line output from a connection to a Colloquy server.
Accepts a single scalar input line or an array of input. Will return a hash reference or array of hash references for each input line, depending on the context that the function called.
The following input line from Colloquy:
LISTTALK neech2 %hello my name is neech {perl}
Will be parsed in to the following structure:
$VAR1 = { 'raw' => 'LISTTALK neech2 %hello my name is neech {perl}', 'msgtype' => 'LISTTALK', 'person' => 'neech2', 'list' => '%perl' 'text' => 'hello my name is neech', 'args' => [ 'hello', 'my', 'name', 'is', 'neech' ], 'command' => 'hello', 'cmdargs' => [ 'my', 'name', 'is', 'neech' ], 'respond' => undef, 'time' => 1148224087, };
Colloquy::Data, Colloquy::Bot::Simple, Chatbot::TalkerBot
$Id: Bot.pm 483 2006-05-22 21:36:46Z nicolaw $
Nicola Worthington <nicolaw@cpan.org>
http://perlgirl.org.uk
Copyright 2006 Nicola Worthington.
This software is licensed under The Apache Software License, Version 2.0.
http://www.apache.org/licenses/LICENSE-2.0
To install Parse::Colloquy::Bot, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Parse::Colloquy::Bot
CPAN shell
perl -MCPAN -e shell install Parse::Colloquy::Bot
For more information on module installation, please visit the detailed CPAN module installation guide.