Hub::Base::Scope

- NAME
- SYNOPSIS
- DESCRIPTION
- METHODS
- INTERNAL
- AUTHOR
- COPYRIGHT
- UPDATED

# NAME

Hub::Base::Scope - Runtime symbol storage and management routines

Part of the Hub Library

Top

# SYNOPSIS

        use Hub qw(:standard);
        callback( &main );
        sub main {
            print $Hub{'sys/zname'}, "\n";
        }

Top

# DESCRIPTION

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.

Top

# METHODS

compdv | finish | new | prepare | run
comptv | mkobj | obj | rmobj

compdv
  Compose data value

       Usage: compdv ADDRESS, VALUE...

comptv

       Usage: comptv ADDRESS, TEMPLATE, VALUEHASH

  Aka: Compose data value.

finish

       Usage: finish

  The caller's script has completed.

  Commit, flush, synchronize, delete temporaries, etc...

mkobj

       Usage: mkobj ADDRESS, CLASS, [ARGS...]

  Make (register or create) a new object.

  Returns like 'obj'.

new

       Usage: new

  Constructor

obj

       Usage: obj ADDRESS

  Access a registered object.

  If the object isn't registered, silently log the error via NoOp.

prepare

       Usage: prepare

  The system is about to invoke the caller's script.

  Prepare the instance by creating, refreshing, or initializing data.

rmobj

       Usage: rmobj ADDRESS

  Remove (unregister or release) an object.

run

       Usage: run SUB

  Main action method

Top

# INTERNAL

AUTOLOAD | DESTROY | _loadconf

AUTOLOAD

       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).

DESTROY

       Usage: DESTROY

  Defining this function prevents it from being searched in AUTOLOAD

_loadconf
  Load configuration for script

  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.

Top

# AUTHOR

Ryan Gies

Top

# COPYRIGHT

Copyright (c) 2006 Livesite Networks, LLC. All rights reserved.

Copyright (c) 2000-2005 Ryan Gies. All rights reserved.

Top

# UPDATED

This file created by on at

Top