Hub::Base::Scope - Runtime symbol storage and management routines
Part of the Hub Library
use Hub qw(:standard);
callback( &main );
sub main {
print $Hub{'sys/zname'}, "\n";
}
This class is used internally and represents a runtime instance. The symbol
$Hub is an instance of this package. A default Scope (LIBRARY) is created at
when the Hub library is loaded.
| compdv | finish | new | prepare | run |
| comptv | mkobj | obj | rmobj |
Usage: compdv ADDRESS, VALUE...
Usage: comptv ADDRESS, TEMPLATE, VALUEHASH
Aka: Compose data value.
Usage: finish
The caller's script has completed.
Commit, flush, synchronize, delete temporaries, etc...
Usage: mkobj ADDRESS, CLASS, [ARGS...]
Make (register or create) a new object.
Returns like 'obj'.
Usage: new
Constructor
Usage: obj ADDRESS
Access a registered object.
If the object isn't registered, silently log the error via NoOp.
Usage: prepare
The system is about to invoke the caller's script.
Prepare the instance by creating, refreshing, or initializing data.
Usage: rmobj ADDRESS
Remove (unregister or release) an object.
Usage: run SUB
Main action method
| AUTOLOAD | DESTROY | _loadconf |
Usage: AUTOLOAD
Data handlers:
get?v take?v set?v append?v
where ? can be i|p|c|o
Object calls: (anything that isn't a data-handler).
Usage: DESTROY
Defining this function prevents it from being searched in AUTOLOAD
Files are loaded in this order (where the script name is 'myscript.pl'):
.conf # Always read (Shared by all scrips in same directory)
# If .conf (above) defines server_conf, it is read here
.myscript.hf # Dot plus name of script, in the script's directory
myscript.hf # Same name as script, in the script's directory
conf/myscript.hf # Same name as script, in the scripts's 'conf' subdirectory
The intention is that the hidden configuration files:
'.conf' and '.myscript.hf'
are owned by the 'installer'. When distributing upgrades of these files are the proper place to make include configuration changes. While the consumer should make changes in:
, myscript.hf, or conf/myscript.hf
Notes:
1) is the place to override '.conf' for all scripts in the same directory.
2) 'myscript.hf' and 'conf/myscript.hf' should be used exclusively, where conf/myscript.hf is chosen for a cleaner file structure.
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