From a5f3b76aa8fd1c8d13695f814d61c8bda767d021 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 11 Oct 2012 22:58:33 +0200 Subject: Add description. Use constants. --- lib/App/smsg/Command/Talk.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/App') 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 []' } - -sub opt_spec { - return ( +use constant abstract => q (Respond (stupidly simple) when addressed in a Jabber MUC.); +use constant usage_desc => '%c talk %o []'; +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) = @_; -- cgit v1.2.3