1Path::FindDev::Object(3U)ser Contributed Perl DocumentatiPoanth::FindDev::Object(3)
2
3
4

NAME

6       Path::FindDev::Object - Object oriented guts to FindDev
7

VERSION

9       version v0.5.3
10

SYNOPSIS

12           require Path::FindDev::Object;
13           my $finder = Path::FindDev::Object->new();
14           my $dev = $finder->find_dev($path);
15

DESCRIPTION

17       This module implements the innards of "Path::FindDev", and is only
18       recommended for use if the Exporter "API" is insufficient for your
19       needs.
20

METHODS

22   "has_set"
23       Determines if the "set" attribute exists
24
25   "has_uplevel_max"
26       Determines if the "uplevel_max" attribute is provided.
27
28   "find_dev"
29       Find a parent at, or above $OtherPath that resembles a "devel"
30       directory.
31
32           my $path = $object->find_dev( $OtherPath );
33

ATTRIBUTES

35   "set"
36       (optional)
37
38       The "Path::IsDev::HeuristicSet" subclass for your desired Heuristics.
39
40   "uplevel_max"
41       If provided, limits the number of "uplevel" iterations done.
42
43       ( that is, limits the number of times it will step up the hierarchy )
44
45   "nest_retry"
46       The number of "dev" directories to "ignore" in the hierarchy.
47
48       This is provided in the event you have a "dev" directory within a "dev"
49       directory, and you wish to resolve an outer directory instead of an
50       inner one.
51
52       By default, this is 0, or "stop at the first "dev" directory"
53
54   "isdev"
55       The "Path::IsDev" object that checks nodes for "dev"-ishness.
56

PRIVATE METHODS

58   "_instance_id"
59       An opportunistic sequence number for help with debug messages.
60
61       Note: This is not guaranteed to be unique per instance, only guaranteed
62       to be constant within the life of the object.
63
64       Based on "refaddr", and giving out new ids when new "refaddr"'s are
65       seen.
66
67           my $id = $object->_instance_id;
68
69   "BUILD"
70       "BUILD" is an implementation detail of "Moo"/"Moose".
71
72       This module hooks "BUILD" to give a self report of the object to
73       *STDERR after "->new" when under $DEBUG
74
75   "_debug"
76       The debugger callback.
77
78           export PATH_FINDDEV_DEBUG=1
79
80       to get debug info.
81
82           $object->_debug($message);
83
84   "_error"
85       The error reporting callback.
86
87           $object->_error($message);
88
89   "_step"
90       Inner code path of tree walking.
91
92           my ($dev_levels, $uplevels ) = (0,0);
93
94           my $result = $object->_step( path($somepath), \$dev_levels, \$uplevels );
95
96           $result->{type} eq 'stop'   # if flow control should end
97           $result->{type} eq 'next'   # if flow control should ascend to parent
98           $result->{type} eq 'found'  # if flow control has found the "final" dev directory
99

AUTHOR

101       Kent Fredric <kentnl@cpan.org>
102
104       This software is copyright (c) 2017 by Kent Fredric
105       <kentfredric@gmail.com>.
106
107       This is free software; you can redistribute it and/or modify it under
108       the same terms as the Perl 5 programming language system itself.
109
110
111
112perl v5.30.1                      2020-01-30          Path::FindDev::Object(3)
Impressum