SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

Path::FindDev::Object

Section: User Contributed Perl Documentation (3)
Updated: 2017-03-10
Index 

NAME

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

VERSION

version v0.5.3 

SYNOPSIS

    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 isonly recommended for use if the Exporter "API" is insufficient for your needs. 

METHODS

 

has_set

Determines if the "set" attribute exists 

has_uplevel_max

Determines if the "uplevel_max" attribute is provided. 

find_dev

Find a parent at, or above $OtherPath that resembles a "devel" directory.

    my $path = $object->find_dev( $OtherPath );
 

ATTRIBUTES

 

set

(optional)

The "Path::IsDev::HeuristicSet" subclass for your desired Heuristics. 

uplevel_max

If provided, limits the number of "uplevel" iterations done.

( that is, limits the number of times it will step up the hierarchy ) 

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 wishto resolve an outer directory instead of an inner one.

By default, this is 0, or "stop at the first "dev" directory" 

isdev

The "Path::IsDev" object that checks nodes for "dev"-ishness. 

PRIVATE METHODS

 

_instance_id

An opportunistic sequence number for help with debug messages.

Note: This is not guaranteed to be unique per instance, only guaranteedto be constant within the life of the object.

Based on "refaddr", and giving out new ids when new "refaddr"'s are seen.

    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 objectto *STDERR after "->new" when under $DEBUG 

_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.

    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 <kentnlAATTcpan.org> 

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Kent Fredric <kentfredricAATTgmail.com>.

This is free software; you can redistribute it and/or modify it underthe same terms as the Perl 5 programming language system itself.


 

Index

NAME
VERSION
SYNOPSIS
DESCRIPTION
METHODS
has_set
has_uplevel_max
find_dev
ATTRIBUTES
set
uplevel_max
nest_retry
isdev
PRIVATE METHODS
_instance_id
BUILD
_debug
_error
_step
AUTHOR
COPYRIGHT AND LICENSE

This document was created byman2html,using the manual pages.