NAME
App::SpreadRevolutionaryDate::Target - Role providing interface for targets of App::SpreadRevolutionaryDate.
VERSION
version 0.38
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. App::SpreadRevolutionaryDate::BlueskyLite, Twitter::API, 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.
There is a Bluesky Perl module on CPAN that would have been the best choice of worker
for Bluesky. But it needs at least Perl v5.40.0, which is a requirement that most Perl installations does not meet yet. So we've included a very simple worker
App::SpreadRevolutionaryDate::BlueskyLite in this distribution, based on post by William Shunn. It does not intend to extensively cover Blusky nor At (the protocol Bluesky is based on), just a way to connect and post a message to Bluesky.
SEE ALSO
- spread-revolutionary-date
- App::SpreadRevolutionaryDate
- App::SpreadRevolutionaryDate::Config
- App::SpreadRevolutionaryDate::BlueskyLite
- App::SpreadRevolutionaryDate::Target::Bluesky
- App::SpreadRevolutionaryDate::Target::Twitter
- App::SpreadRevolutionaryDate::Target::Mastodon
- App::SpreadRevolutionaryDate::Target::Freenode
- App::SpreadRevolutionaryDate::Target::Freenode::Bot
- App::SpreadRevolutionaryDate::Target::Liberachat
- App::SpreadRevolutionaryDate::Target::Liberachat::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 <gibus@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2019-2024 by Gérald Sédrati.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007