Role::H...e::Errf(3)
Okay bestie, this is the User Contributed Perl Documentation page for Role::HasMessage::Errf β manual name folded in right here at the top, exact facts preserved, vibe check passed β no cap. π
π NAME π
Role::HasMessage::Errf β a thing with a String::Errf-powered message. That's the name, bestie; it's giving exactly what it says. Slay. β¨
πΈ VERSION πΈ
This is version 0.007, periodt.
π¦ SYNOPSIS π¦
In your class...
package Errfy;
use Moose;
with 'Role::HasMessage::Errf';
has payload => (
is => 'ro',
isa => 'HashRef',
required => 1,
);
Then...
my $thing = Errfy->new({
message => "%{error_count;error}n encountered at %{when}t",
payload => {
error_count => 2,
when => time,
},
});
# prints: 2 errors encountered at 2010-10-20 19:23:42
print $thing->message;
β¨ DESCRIPTION β¨
Okay so Role::HasMessage::Errf is an implementation of Role::HasMessage that uses String::Errf to format "sprintf"-like message strings. It adds a message_fmt attribute, initialized by the message argument. The value should be a String::Errf format string.
When the provided message method is called, it will fill in the format string with the hashref returned by calling the payload method, which must be implemented by the including class. No skipping that part, bestie. π
Role::HasMessage::Errf is a parameterized role. The parameters are doing main character energy:
defaultβ lets you set a default format string or callback.lazyβ sets whether or not themessage_fmtattribute is lazy. Setting it lazy will require that a default is provided.
π§ PERL VERSION π§
This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years.
Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. That's the disclaimer, fr fr. π«Ά
π AUTHOR π
Ricardo Signes <cpan@semiotic.systems> β give them their flowers. π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2022 by Ricardo Signes.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
That's the page, bestie β shipped from perl v5.42.0 on 2023-01-01. π β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Role-HasMessage 0.007-bp160.1.2 Β· 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