package App::smsg::Command::Send; use 5.010; use strict; use warnings; use utf8; BEGIN { $App::smsg::Command::Send::AUTHORITY = 'https://dr.jones.dk/me#me'; $App::smsg::Command::Send::VERSION = '0.001'; } use App::smsg -command; use namespace::clean; use constant abstract => q (Send a message to one or more recipients.); use constant usage_desc => '%c send %o ...'; use constant description => <<'DESCRIPTION'; Send a message to one or more targets. Targets can be single recipients or groups, when defined. When an option is needed but not provided, it is attempted resolved from previous related communication, then from defaults, and then interactively prompted for. DESCRIPTION use constant opt_spec => ( ['origin|from=s', "Faked sender ID"], ['target|to=s', "Recipient ID"], ['platform|on=s', "Platform to operate on. Either generic (chat, sms, microblog) or specific (kannel, jabber, irc, twitter, status.net)."], ['intermediary|via=s', "Message center, host or net to use in case of multiple routes"], [], # [ 'verbose|v', "print extra stuff"], [ 'debug', "print debug stuff"], ); sub validate_args { my ($self, $opt, $args) = @_; $self->usage_error("too few arguments") unless @$args >= 1; } sub execute { my ($self, $opt, $args) = @_; # TODO: error if pause and no active chain # TODO: error if continue and no paused chain die 'FIXME: unimplemented!'; } 1;