Messag...ponent(3pm)
π Message::Passing::Role::CLIComponent π
okay bestie, welcome to the User Contributed Perl Documentation page for Message::Passing::Role::CLIComponent(3pm) β yes that's a whole mouthful, we know, but stick with me, it's actually iconic β¨
πΈ NAME πΈ
Message::Passing::Role::CLIComponent β it's a Package::Variant situation, and it hands you foo and foo_options attributes π
π¦ SYNOPSIS π¦
here's the vibe, copy-paste ready, no cap:
package My::Message::Passing::Script;
use Moo;
use MooX::Options;
use Message::Passing::Role::CLIComponent;
use Message::Passing::DSL;
use namespace::clean -except => 'meta';
with
CLIComponent( name => 'input', default => 'STDIN' ),
'Message::Passing::Role::Script';
sub build_chain {
my $self = shift;
message_chain {
input example => ( %{ $self->input_options }, output_to => 'test_out', class => $self->input, );
output test_out => ( ... );
};
}
__PACKAGE__->start unless caller;
1;
look at that. chef's kiss. π
β¨ DESCRIPTION β¨
so basically this is a Package::Variant role producer, and what it does is serve you up a pair of attributes β one for name, one for options β exactly like the message-pass script does it. that's the whole gig, and it ate. π₯
π ROLE PARAMETERS π
π name
the name of the main attribute, bestie. and here's the cute part β an extra attribute called ${name}_options gets added alongside it, and it coerces a hashref from JSON. two for the price of one, we love to see it π«Ά
πΈ default
a default value for the main attribute. but lowkey important: if you don't supply this one, then the attribute becomes required instead. so like, you gotta pick a lane. π
π SPONSORSHIP π
this module literally exists because of the wonderful people at Suretec Systems Ltd. <http://www.suretecsystems.com/> β they sponsored its development for their VoIP division called SureVoIP <http://www.surevoip.co.uk/>, for use with the SureVoIP API β <http://www.surevoip.co.uk/support/wiki/api_documentation> π₯Ή
shoutout to them fr fr, funding open source is main character energy π
π AUTHOR, COPYRIGHT AND LICENSE π
see Message::Passing. that's it, that's the whole section, go peek over there bestie π
ngl if you're still here, you're a real one. go build something slay with it π
and that's a wrap, babes! this page comes to you from perl v5.32.1, dated 2021-11-09, under the Messag...ponent(3pm) name β mwah, periodt β¨π¦π
π¦ where this page comes from
- debian bookworm: libmessage-passing-perl 0.117-1 Β· LGPL-2.1-only
- debian trixie: libmessage-passing-perl 0.117-1 Β· LGPL-2.1-only
- ubuntu jammy: libmessage-passing-perl 0.117-1 Β· LGPL-2.1-only
- ubuntu noble: libmessage-passing-perl 0.117-1 Β· LGPL-2.1-only
- ubuntu resolute: libmessage-passing-perl 0.117-1 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms