App::SpreadRevolutionaryDate::Target - Role providing interface for targets of App::SpreadRevolutionaryDate.
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. 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.
Gérald Sédrati <firstname.lastname@example.org>
This software is Copyright (c) 2019-2023 by Gérald Sédrati.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007
To install App::SpreadRevolutionaryDate, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.