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
URI::NamespaceMap::ReservedLocalParts(3) User Contributed Perl Documentation URI::NamespaceMap::ReservedLocalParts(3)

URI::NamespaceMap::ReservedLocalParts - Permissible local parts for NamespaceMap

Version 1.10

    my $r = URI::NamespaceMap::ReservedLocalParts->new(disallowed => [qw/uri/]);
    say $r->is_reserved('isa'); # 1
    say $r->is_reserved('uri'); # 1
    say $r->is_reserved('foo'); # 0

URI::NamespaceMap::ReservedLocalParts is an accompanying distribution to URI::NamespaceMap. It's goal is to check for forbidden names used for local parts.

Rather than creating a blacklist that needs to be maintained, it instantiates a new Moo object, and calls "can" on the invocant. Using this technique, it means that every method on every Perl object ("isa, can, VERSION"), and Moo objects ("BUILD, BUILDARGS") will be automatically black listed.

URI::NamespaceMap::ReservedLocalParts implements the following attributes.

A whitelist of local part names. Defaults to "allowed", "disallowed" and "is_reserved" so that when "can" is called on the instance, it doesn't return a false positive for other method names associated with this package.

A blacklist of local part names. Does not have a default set, but usually defaults to "uri" when called from URI::NamespaceMap.

URI::NamespaceMap::ReservedLocalParts implements the following methods.

    my $r = URI::NamespaceMap::ReservedLocalParts->new(disallowed => [qw/uri/]);
    say $r->is_reserved('isa'); # 1
    say $r->is_reserved('uri'); # 1
    say $r->is_reserved('foo'); # 0

Checks if the first argument passed is reserved or not. Returns a "boolean".

See URI::NamespaceMap for further details about authors, license, etc.

2024-01-11 perl v5.40.2

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

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