Hub::Data::Address -
Part of the Hub Library
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
dotaddr( "p004:proj:1000:name" );
p004.proj.1000.name
dotaddr( "p001" );
p001
dotaddr( "" );
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
Usage: keydepth
For sorting parents and children, this simpley lets you know how deep the key is named.
keydepth( 'and:then:came:the:rain' )
4
Usage: varname VARADDR
varname( "p001:items:1002:text-desc" );
text-desc
varname( "p001" );
Usage: varparent VARADDR
Parent address.
varparent( "p001:items:12:1000" );
p001:items:12
varparent( "p001:items:10:subs:100" );
p001:items:10:subs
varparent( "p001" );
Usage: varroot VARADDR
The root portion of the address.
varroot( "p001:items:1002:text-description" );
varroot( "p001" );
Usage: vartype VARADDR, [DEFAULT]
Return a variables type (or a default value).
vartype( );
vartype( "clr-bg" );
clr
vartype( "clr-bg", "default" );
vartype( "whatev", "default" );
default
vartype( "whatev" );
vartype( "a:b:c" );
vartype( "x-a:b:c" );
x
vartype( "a:b:x-c" );
Ryan Gies
Copyright (c) 2006 Livesite Networks, LLC. All rights reserved.
Copyright (c) 2000-2005 Ryan Gies. All rights reserved.
This file created by on at
To install Hub, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Hub
CPAN shell
perl -MCPAN -e shell install Hub
For more information on module installation, please visit the detailed CPAN module installation guide.