NAME
Hub::Data::Address -
Part of the Hub Library
SYNOPSIS
DESCRIPTION
METHODS
| dotaddr | keydepth | varparent | vartype |
| expand | varname | varroot |
- dotaddr
-
Usage: dotaddr VARADDRReplace address separators with dots. In essence, protecting the address from expansion.
Example: This example:
dotaddr( "p004:proj:1000" );matches:
p004.proj.1000Example: This example:
dotaddr( "p004:proj:1000:name" );matches:
p004.proj.1000.nameExample: This example:
dotaddr( "p001" );matches:
p001Example: 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: keydepthFor 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 VARADDRExample: This example:
varname( "p001:items:1002:text-desc" );matches:
text-descExample: This example:
varname( "p001" );matches:
p001
- varparent
-
Usage: varparent VARADDRParent address.
Example: This example:
varparent( "p001:items:12:1000" );matches:
p001:items:12Example: This example:
varparent( "p001:items:10:subs:100" );matches:
p001:items:10:subsExample: This example:
varparent( "p001" );matches:
- varroot
-
Usage: varroot VARADDRThe root portion of the address.
Example: This example:
varroot( "p001:items:1002:text-description" );matches:
p001Example: 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:
clrExample: This example:
vartype( "clr-bg", "default" );matches:
clrExample: This example:
vartype( "whatev", "default" );matches:
defaultExample: This example:
vartype( "whatev" );matches:
Example: This example:
vartype( "a:b:c" );matches:
Example: This example:
vartype( "x-a:b:c" );matches:
xExample: 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