Andrew Sterling Hanenkamp > Bot-Net-0.1.0 > Bot::Net::Util

Download:
Bot-Net-0.1.0.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

Bot::Net::Util - miscellaneous utility functions

SYNOPSIS ^

  my @args = Bot::Net::Util->parse_bot_command($message);

DESCRIPTION ^

Provides utility functions for use elsewhere.

METHODS ^

parse_bot_command MESSAGE

Returns an array of words found in the given message. This tries to sensibly break up a command. The string will be split on whitespace or grouped by quotes.

Quoted strings may contain quotes by containing a double-quote to escape it. For example,

  tell 'bob''s friend' """Hello World"""

would become:

  ('tell', "bob's friend", '"Hello World"')

AUTHORS ^

Andrew Sterling Hanenkamp <hanenkamp@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright 2007 Boomer Consulting, Inc. All Rights Reserved.

This program is free software and may be modified and distributed under the same terms as Perl itself.

syntax highlighting: