Bread:...ersable(3pm)
β¨ NAME β¨
okay so this is Bread::Board::Traversable β it's a role for traversing a container service tree π (and yes bestie, it lives in the User Contributed Perl Documentation corner of the 3pm manuals, we're fancy like that)
πΈ VERSION πΈ
version 0.37 π
π¦ SYNOPSIS π¦
my $service = $container->fetch('/some/service/path');
my $root = $service->get_root_container;
like. that's it. that's the whole vibe check. β¨
π DESCRIPTION π
so this role hands you the basic functionality to traverse a container / service tree. the tea is: any class that consumes this role gets a whole parent-child relationship between instances. it's giving family tree but make it services π³π
π ATTRIBUTES π
parent
a weak ref to another Bread::Board::Traversable object. it's a read/write accessor, okay, but you should probably not change this value directly in normal code π like it's there, it works, but pls don't.
β METHODS β
has_parent
predicate for the parent attribute π« true if a parent has been set. basically "do i have a mother" but for objects.
detach_from_parent
clearer for the parent attribute. you should probably not call this method in normal code π it's giving "i'm emancipating myself" energy but pls don't actually.
get_root_container
returns the farthest ancestor of the invocant β aka the top-most container this object is a part of π main character at the very top of the tree, no cap.
fetch
my $service = $this->fetch('/absolute/path');
my $service = $this->fetch('relative/path');
my $service = $this->fetch('../relative/path');
give it a (relative or absolute) path to a service or container and this method walks the tree and returns the Bread::Board::Service or Bread::Board::Container instance for that path. πΆβοΈπ³
heads up bestie: it dies if no object can be found for the given path π no object, no service, no mercy.
also, aliases are resolved in this call, by calling "aliased_from" until we get an actual service. iconic behaviour honestly, it keeps going till it finds the real one π«Ά
π AUTHOR π
Stevan Little <stevan@iinteractive.com> β yes the legend himself, we stan π§
π BUGS π
pls report any bugs or feature requests on the bugtracker website:
https://github.com/stevan/BreadBoard/issues
and when you're 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 π like give us the receipts, fr fr.
π 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 lil manual came to you courtesy of perl v5.36.0, dated 2022-12-12 πΈπ¦π go forth and traverse that tree, you absolute icon πβ¨
π¦ 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