diff options
author | Jonas Smedegaard <jonas@atreju.jones.dk> | 2012-10-11 22:58:33 +0200 |
---|---|---|
committer | Jonas Smedegaard <jonas@atreju.jones.dk> | 2012-10-11 23:02:14 +0200 |
commit | a5f3b76aa8fd1c8d13695f814d61c8bda767d021 (patch) | |
tree | beb9f7c2912de2207efeb130f70f4cfa4fe50170 | |
parent | 80f023217b63b3a29937c33486a480b2b7fdc17b (diff) |
Add description. Use constants.
-rw-r--r-- | lib/App/smsg/Command/Talk.pm | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/App/smsg/Command/Talk.pm b/lib/App/smsg/Command/Talk.pm index 636633f..cffdaa5 100644 --- a/lib/App/smsg/Command/Talk.pm +++ b/lib/App/smsg/Command/Talk.pm @@ -23,12 +23,13 @@ use AnyEvent::XMPP::Util qw/node_jid res_jid/; use NetSDS::Kannel; #use Coro; -sub abstract { 'respond (stupidly simple) when addressed in a Jabber MUC' } - -sub usage_desc { '%c talk %o <jid> <password> <talkfile> [<room>]' } - -sub opt_spec { - return ( +use constant abstract => q (Respond (stupidly simple) when addressed in a Jabber MUC.); +use constant usage_desc => '%c talk %o <jid> <password> <talkfile> [<room>]'; +use constant description => <<'DESCRIPTION'; +Connect to a Jabber MUC (a.k.a. chatroom) and emit a (silly) reply to +each message posted which starts with bot name and a colon. +DESCRIPTION +use constant opt_spec => ( ['kannelserver=s', "the Kannel server to connect to", {default => 'localhost'}], ['kannelport=i', "the Kannel port to connect to", @@ -41,8 +42,7 @@ sub opt_spec { [], # [ 'verbose|v', "print extra stuff"], [ 'debug', "print debug stuff"], - ); -} +); sub validate_args { my ($self, $opt, $args) = @_; |