Bread:...Literal(3pm)
β¨ Bread::Board::Literal β the vibe β¨
okay bestie, this is Bread::Board::Literal, a lil module from the User Contributed Perl Documentation corner of the Perl universe (manual section 3pm, iykyk). it's a service providing a literal value and honestly? it's giving "just vibes, but make them constant". π
πΈ VERSION πΈ
version 0.37 β yes ma'am, that's the one. π
π¦ SYNOPSIS π¦
here's the whole thing, bestie, verbatim, don't @ me:
my $c = container PrettyBoring => as {
# These are Bread::Board::Literal services
service connect_string => 'dbi:mysql:boring_db';
service service_url => 'http://api.example.com/v0/boring';
# And some other services depending on them...
service dbconn => (
class => 'DBI',
block => sub {
my $s = shift;
DBI->new($s->param('connect_string');
},
dependencies => wire_names(qw( connect_string )),
);
service service_request => (
class => 'HTTP::Request',
block => sub {
my $s = shift;
HTTP::Request->new(POST => $s->param('service_url'));
},
dependencies => wire_names(qw( service_url ));
};
};
# OR to use directly:
my $literal = Bread::Board::Literal->new(
name => 'the_answer_to_life_the_universe_and_everything',
value => 42,
);
$c->add_service($literal);
like, look at that container named PrettyBoring living its best life. β¨
π DESCRIPTION π
so a literal service is exactly what it sounds like: it stores a literal scalar or reference for use in your Bread::Board. that's it. that's the whole personality. π«Ά
β οΈ BEWARE, BESTIE β οΈ using references in your literals may cause your Bread::Board to leak memory. if that's a concern for you, you may want to weaken your references.
see "weaken" in Scalar::Util for that. no cap. π§
π ATTRIBUTES π
"value"
Required attribute with read/write accessor. this is the value that "get" will return. periodt. π
π METHODS π
"get"
Returns the "value", unaltered. it does not touch it, does not fix it up, does not pass go. it's a "what you put in is what you get out" situation and honestly? iconic. π
"clone_and_inherit_params"
Dies. π
a literal service is (essentially) a constant, so it does not make sense to inherit from it. like, babe, you can't inherit a vibe that's already set in stone. π
π AUTHOR π
Stevan Little <stevan@iinteractive.com> β the main character who wrote this. π«Ά
π BUGS π
Please report any bugs or feature requests on the bugtracker website:
https://github.com/stevan/BreadBoard/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. fr fr, help them reproduce it, that's the group-chat etiquette. π
β COPYRIGHT AND LICENSE β
This software is copyright (c) 2019, 2017, 2016, 2015, 2014, 2013, 2011, 2009 by Infinity Interactive.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay. π
and that's the whole page, bestie! π¦ this one was generated with perl v5.36.0 on 2022-12-12 β so if you're reading this from the future, hi, ily, the literal values still hit different. πβ¨π
π¦ where this page comes from
- debian bookworm: libbread-board-perl 0.37-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libbread-board-perl 0.37-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libbread-board-perl 0.37-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: libbread-board-perl 0.37-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms