GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PATH::ISDEV::OBJECT (3)

.ds Aq ’

NAME

Path::IsDev::Object - Object Oriented guts for IsDev export

CONTENTS

VERSION

version 1.001002

SYNOPSIS



    use Path::IsDev::Object;

    my $dev = Path::IsDev::Object->new();
    my $dev = Path::IsDev::Object->new( set => MySet );

    if ( $dev->matches($path) ){
        print "$path is dev";
    }



DESCRIPTION

Exporting functions is handy for end users, but quickly becomes a huge headache when you’re trying to chain them.

e.g: If you’re writing an exporter yourself, and you want to wrap responses from an exported symbol, while passing through user configuration => Huge headache.

So the exporter based interface is there for people who don’t need anything fancy, while the Object based interface is there for people with more complex requirements.

METHODS

CWmatches

Determine if a given path satisfies the set



    if( $o->matches($path) ){
        print "We have a match!";
    }



ATTRIBUTES

CWset

The name of the HeuristicSet:: to use.

Default is Basic, or the value of $ENV{PATH_ISDEV_DEFAULT_SET}

CWset_prefix

The HeuristicSet prefix to use to expand set to a module name.

Default is Path::IsDev::HeuristicSet

CWset_module

The fully qualified module name.

Composed by joining set and set_prefix

CWloaded_set_module

An accessor which returns a module name after loading it.

PRIVATE METHODS

CW_instance_id

An opportunistic sequence number for help with debug messages.

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.

CW_debug

The debugger callback.



    export PATH_ISDEV_DEBUG=1



to get debug info.

CW_with_debug

Wrap calls to Path::IsDev::debug to have a prefix with an object identifier.



    $ob->_with_debug(sub{
        # Path::Tiny::debug now localised.

    });



CWBUILD

BUILD is an implementation detail of Class::Tiny.

This module hooks BUILD to give a self report of the object to *STDERR after ->new when under $DEBUG

CW_matches



    my $result = $o->matches( $path );



$result here will be a constructed Path::IsDev::Result.

Note this method may be handy for debugging, but you should still call matches for all real code.

AUTHOR

Kent Fredric <kentfredric@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 PATH::ISDEV::OBJECT (3) 2014-08-16

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.