MooX::Keyword::Chain - Subroutine chains
Version 0.03
Quick summary of what the module does.
Perhaps a little code snippet.
package Chains; use Moo; use MooX::Keyword extends => '+Chain'; has boat => ( is => 'ro', default => sub { [ ] } ); chain add => 'politicians' => sub { push @{ $_[0]->boat }, 'leadership'; }; chain add => 'reporters' => sub { push @{ $_[0]->boat }, 'propaganda'; }; chain add => 'bankers' => sub { push @{ $_[0]->boat }, 'finance'; }; 1; ... my $chains = Chains->new(); $chains->add(); # [ 'leadership', 'propaganda', 'finance' ];
create a sub routine which chains from multiple other sub routines.
Configure a chained sub routine.
chain two => 'demo' => sub { ... } chain two => 'show' => sub { ... }
...
$chains->two(); # will call demo and then show
You can also still call each sub routine independently.
$chains->demo(); $chains->show();
LNATION, <email at lnation.org>
<email at lnation.org>
Please report any bugs or feature requests to bug-moox-keyword-chain at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=MooX-Keyword-Chain. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-moox-keyword-chain at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc MooX::Keyword::Chain
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
https://rt.cpan.org/NoAuth/Bugs.html?Dist=MooX-Keyword-Chain
CPAN Ratings
https://cpanratings.perl.org/d/MooX-Keyword-Chain
Search CPAN
https://metacpan.org/release/MooX-Keyword-Chain
This software is Copyright (c) 2023 by LNATION.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install MooX::Keyword::Chain, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooX::Keyword::Chain
CPAN shell
perl -MCPAN -e shell install MooX::Keyword::Chain
For more information on module installation, please visit the detailed CPAN module installation guide.