NAME
App::SpreadRevolutionaryDate::Target - Role providing interface for targets of App::SpreadRevolutionaryDate.
VERSION
version 0.25
DESCRIPTION
This role defines the interface for any target which App::SpreadRevolutionaryDate should spread the revolutionary date to.
Any consuming class can parameterize this role (through MooseX::Role::Parameterized) with a worker
type set to the effective Perl module implementing any protocol needed by this target (eg. Net::Twitter::Lite::WithAPIv1_1, Mastodon::Client). Then, this role provides an obj
required attribute with type constraint defined by the worker
parameter. If no worker
parameter is given, the obj
type defaults to Any
. Constructors of consuming classes should instanciate obj
(with Moose BUILDARGS
or BUILD
, see Moose::Manual::Construction).
Any class consuming this role is required to implement a spread
method, which is called with two parameters: msg
, the message as a string to be spread, and test
, an optional boolean which informs this method to actually spread the message if this parameter is false
(that should be the default), or to just test without spreading.
If the target needs authentication, it can be carried out in the constructor (with Moose BUILDARGS
or BUILD
) or in the implementation of the spread
method, obviously before actually spreading the message.
SEE ALSO
- spread-revolutionary-date
- App::SpreadRevolutionaryDate
- App::SpreadRevolutionaryDate::Config
- App::SpreadRevolutionaryDate::Target::Twitter
- App::SpreadRevolutionaryDate::Target::Mastodon
- App::SpreadRevolutionaryDate::Target::Freenode
- App::SpreadRevolutionaryDate::Target::Freenode::Bot
- App::SpreadRevolutionaryDate::MsgMaker
- App::SpreadRevolutionaryDate::MsgMaker::RevolutionaryDate
- App::SpreadRevolutionaryDate::MsgMaker::RevolutionaryDate::Calendar
- App::SpreadRevolutionaryDate::MsgMaker::RevolutionaryDate::Locale
- App::SpreadRevolutionaryDate::MsgMaker::RevolutionaryDate::Locale::fr
- App::SpreadRevolutionaryDate::MsgMaker::RevolutionaryDate::Locale::en
- App::SpreadRevolutionaryDate::MsgMaker::RevolutionaryDate::Locale::it
- App::SpreadRevolutionaryDate::MsgMaker::RevolutionaryDate::Locale::es
- App::SpreadRevolutionaryDate::MsgMaker::PromptUser
AUTHOR
Gérald Sédrati-Dinet <gibus@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2019 by Gérald Sédrati-Dinet.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007