NAME
Hub::Data::Address -
Part of the Hub Library
SYNOPSIS
DESCRIPTION
METHODS
dotaddr | keydepth | varparent | vartype |
expand | varname | varroot |
- dotaddr
-
Usage: dotaddr VARADDR
Replace address separators with dots. In essence, protecting the address from expansion.
Example: This example:
dotaddr( "p004:proj:1000" );
matches:
p004.proj.1000
Example: This example:
dotaddr( "p004:proj:1000:name" );
matches:
p004.proj.1000.name
Example: This example:
dotaddr( "p001" );
matches:
p001
Example: This example:
dotaddr( "" );
matches:
- expand
-
Usage: expand HASHREF, [OPTIONS]
Expands keys which are formatted as names (see naming.txt) into subhashes and subarrays as necessary.
OPTIONS:
meta => 1 # add '_address' and '_id' metadata to hashes root => SCALAR # use this as a prefix for '_address'
Returns HASHREF
- keydepth
-
Usage: keydepth
For sorting parents and children, this simpley lets you know how deep the key is named.
Example: This example:
keydepth( 'and:then:came:the:rain' )
matches:
4
- varname
-
Usage: varname VARADDR
Example: This example:
varname( "p001:items:1002:text-desc" );
matches:
text-desc
Example: This example:
varname( "p001" );
matches:
p001
- varparent
-
Usage: varparent VARADDR
Parent address.
Example: This example:
varparent( "p001:items:12:1000" );
matches:
p001:items:12
Example: This example:
varparent( "p001:items:10:subs:100" );
matches:
p001:items:10:subs
Example: This example:
varparent( "p001" );
matches:
- varroot
-
Usage: varroot VARADDR
The root portion of the address.
Example: This example:
varroot( "p001:items:1002:text-description" );
matches:
p001
Example: This example:
varroot( "p001" );
matches:
p001
- vartype
-
Usage: vartype VARADDR, [DEFAULT]
Return a variables type (or a default value).
Example: This example:
vartype( );
matches:
Example: This example:
vartype( "clr-bg" );
matches:
clr
Example: This example:
vartype( "clr-bg", "default" );
matches:
clr
Example: This example:
vartype( "whatev", "default" );
matches:
default
Example: This example:
vartype( "whatev" );
matches:
Example: This example:
vartype( "a:b:c" );
matches:
Example: This example:
vartype( "x-a:b:c" );
matches:
x
Example: This example:
vartype( "a:b:x-c" );
matches:
x
INTERNAL
AUTHOR
Ryan Gies
COPYRIGHT
Copyright (c) 2006 Livesite Networks, LLC. All rights reserved.
Copyright (c) 2000-2005 Ryan Gies. All rights reserved.
UPDATED
This file created by on at