Path::F...::Object(3)
π
Path::FindDev::Object β okay bestie, welcome to the Path::F...::Object(3) page π
This is straight from User Contributed Perl Documentation, and it's giving object-oriented guts energy. Let's get into it π«Ά
πΈ NAME πΈ
Path::FindDev::Object β Object oriented guts to FindDev β¨
π VERSION π
version v0.5.3 β yes, that's the version, periodt π
π¦ SYNOPSIS π¦
Okay so here's the bare-bones flex:
require Path::FindDev::Object;
my $finder = Path::FindDev::Object->new();
my $dev = $finder->find_dev($path);
π₯ DESCRIPTION π₯
This module implements the innards of Path::FindDev, and it's only recommended for use if the Exporter API is insufficient for your needs. Like, it's the inner machinery, not the main-character API π
π METHODS π
has_set
Determines if the set attribute exists. That's it, that's the vibe check β
has_uplevel_max
Determines if the uplevel_max attribute is provided. Lowkey useful, ngl π«Ά
find_dev
Find a parent at, or above $OtherPath that resembles a devel directory. Slay π₯
my $path = $object->find_dev( $OtherPath );
π ATTRIBUTES π
set
(optional)
The Path::IsDev::HeuristicSet subclass for your desired Heuristics. Iconic little customization moment β¨
uplevel_max
If provided, limits the number of uplevel iterations done.
( that is, limits the number of times it will step up the hierarchy )
So yeah, it caps how many times it climbs up the tree π
nest_retry
The number of dev directories to "ignore" in the hierarchy.
This is provided in the event you have a dev directory within a dev directory, and you wish to resolve an outer directory instead of an inner one. Nested-dev situation, iykyk π
By default, this is 0, or "stop at the first dev directory" π
isdev
The Path::IsDev object that checks nodes for dev-ishness. Literally the vibe-checker for directories π
π PRIVATE METHODS π
_instance_id
An opportunistic sequence number for help with debug messages. Cute little debug helper π
Note: This is not guaranteed to be unique per instance, only guaranteed to be constant within the life of the object.
Based on refaddr, and giving out new ids when new refaddr's are seen. No cap.
my $id = $object->_instance_id;
BUILD
BUILD is an implementation detail of Moo/Moose.
This module hooks BUILD to give a self report of the object to *STDERR after ->new when under $DEBUG. Very "let me announce myself" energy π
_debug
The debugger callback.
export PATH_FINDDEV_DEBUG=1
to get debug info.
$object->_debug($message);
_error
The error reporting callback.
$object->_error($message);
_step
Inner code path of tree walking. This is the main-character recursion moment π₯
my ($dev_levels, $uplevels ) = (0,0);
my $result = $object->_step( path($somepath), \$dev_levels, \$uplevels );
$result->{type} eq 'stop' # if flow control should end
$result->{type} eq 'next' # if flow control should ascend to parent
$result->{type} eq 'found' # if flow control has found the "final" dev directory
π AUTHOR π
Kent Fredric <kentnl@cpan.org> π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2017 by Kent Fredric <kentfredric@gmail.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Fr fr, free software rights π«Ά
And that's the whole page, bestie πΈ Cute little sign-off: this was perl v5.42.0, dated 2017-03-11, for Path::F...::Object(3) β stay slaying those dev directories π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Path-FindDev 0.5.3-bp160.1.11 Β· Artistic-1.0 or GPL-1.0+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms