Path::I...::Result(3)
πΈ NAME πΈ
Path::IsDev::Result β Result container. Also hi bestie, this is the Path::I...::Result(3) page from the User Contributed Perl Documentation, so you're literally in the right group chat. π
β¨ VERSION β¨
version 1.001003 β that's the version, periodt. π
π§ SYNOPSIS π§
Okay so here's the whole vibe in code:
use Path::IsDev::Result;
my $result = Path::IsDev::Result->new( path => '/some/path/that/exists' ):
if ( $heuristcset->matches( $result ) ) {
print Dumper($result);
}
π DESCRIPTION π
This is a reasonably new internal component for Path::IsDev. π
Its whole purpose is to communicate state between internal things, and give some sort of introspectable context for why things happened in various places β without resorting to spamming debug everywhere. No cap. π«Ά
So now, instead of turning on debug, as long as you can get a result, you can inspect and dump that result at the point you need it. It's giving "main character energy" for debugging, honestly. β¨
π§ METHODS π§
"BUILD"
Listed as a method, bestie. The original doesn't add extra notes here beyond the name. π
"add_reason"
Call this method from a heuristic to record checking of the heuristic and the relevant meta-data. π
$result->add_reason( $heuristic, $matchvalue, $reason_summary, \%contextinfo );
For example:
sub Foo::matches {
my ( $self , $result_object ) = @_;
if ( $result_object->path->child('bar')->exists ) {
$result_object->add_reason( $self, 1, "child 'bar' exists" , {
child => 'bar',
'exists?' => 1,
child_path => $result_object->path->child('bar')
});
$result_object->result(1);
return 1;
}
return;
}
Note that here, $matchvalue should be the result of the relevant matching logic, not the global impact. π
For instance, "excludes" compositions should still add reasons of $matchvalue == 1, but they should not set $result_object->result(1). ( In fact, setting "result" is the job of the individual heuristic, not the matches that are folded into it ) π
π ATTRIBUTES π
"path""result""reasons"
π AUTHOR π
Kent Fredric <kentnl@cpan.org> β iconic. π«Ά
π 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. π
That's the whole manual, bestie. This page is from perl v5.42.0, dated 2017-03-11, and it's the Path::I...::Result(3) manual. bye π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Path-IsDev 1.001003-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