MooseX:...nvelope(3)
π NAME π
MooseX::App::Message::Envelope β Message presented to the user π
okay so this is the User Contributed Perl Documentation page, and the manual name up top is MooseX:...nvelope(3) (ellipsis included, no notes π
).
β¨ DESCRIPTION β¨
Whenever MooseX::App needs to pass a message to the user, it does so by generating a MooseX::App::Message::Envelope object. No cap. The object usually contains one or more blocks (MooseX::App::Message::Block) and can be easily stringified β slay.
Usually a MooseX::App::Message::Envelope object is generated and returned by the new_with_command method in MooseX::App::Base if there is an error or if the user requests help. So like, error? help? envelope. π«Ά
To avoid useless object type checks when working with this method, MooseX::App::Message::Envelope follows the Null-class pattern. So you can do this, no matter if new_with_command fails or not:
MyApp->new_with_command->some_method->only_called_if_successful;
and then the original description just ends with a lonelyIfbeforeMETHODSπ bestie Iβm not editing that out β itβs part of the lore.
π METHODS π
π¦ stringify π¦
Stringifies the messages. iconic behavior, honestly.
πΈ overload πΈ
This method is called whenever the object is stringified via overload. In this case it prints the message on either STDERR or STDOUT, and exits the process with the given exitcode (if any). yes, it really said βeitherβ and yes, it exits β read that twice if you need to π
π add_block π
Adds a new message block. Param must be a MooseX::App::Message::Block.
π list_blocks π
Returns a list on message blocks. (the page says βonβ, not βofβ β Iβm just the messenger π )
π§ blocks π§
Message block accessor.
π exitcode π
Exitcode accessor.
β has_exitcode β
Check if exitcode is set.
π₯ OVERLOAD π₯
Stringification of this object is overloaded.
π AUTOLOAD π
You can call any method on the message class.
okay bye bestie πβ¨ this page is from perl v5.42.0, dated 2024-08-09, and the manual footer is MooseX:...nvelope(3) β mwah π«Άπ
π¦ where this page comes from
- opensuse-leap 16.0: perl-MooseX-App 1.430.1-bp160.1.10 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms