=head1 NAME

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

Part of the L<Hub Library|hublib>

=head1 SYNOPSIS


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


=head1 DESCRIPTION


This class is used internally and represents a runtime instance.  The symbol
C<$Hub> is an instance of this package. A default Scope (LIBRARY) is created at 
when the Hub library is loaded.


=head1 METHODS

=begin html

<table><tr><td>
<a class="methlink" href="#item_compdv">compdv</a>

</td><td>
<a class="methlink" href="#item_finish">finish</a>

</td><td>
<a class="methlink" href="#item_new">new</a>

</td><td>
<a class="methlink" href="#item_prepare">prepare</a>

</td><td>
<a class="methlink" href="#item_run">run</a>

</td></tr><tr><td>
<a class="methlink" href="#item_comptv">comptv</a>

</td><td>
<a class="methlink" href="#item_mkobj">mkobj</a>

</td><td>
<a class="methlink" href="#item_obj">obj</a>

</td><td>
<a class="methlink" href="#item_rmobj">rmobj</a>

</td></tr></table>

=end html


=over 4

=item compdv

B<Compose data value>




 Usage: compdv ADDRESS, VALUE...


=back

=over 4

=item comptv

B<>

 Usage: comptv ADDRESS, TEMPLATE, VALUEHASH

Aka: Compose data value.


=back

=over 4

=item finish

B<>

 Usage: finish

The caller's script has completed.

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


=back

=over 4

=item mkobj

B<>

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

Make (register or create) a new object.

Returns like 'obj'.


=back

=over 4

=item new

B<>

 Usage: new

Constructor

=back

=over 4

=item obj

B<>

 Usage: obj ADDRESS

Access a registered object.

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


=back

=over 4

=item prepare

B<>

 Usage: prepare

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

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


=back

=over 4

=item rmobj

B<>

 Usage: rmobj ADDRESS

Remove (unregister or release) an object.


=back

=over 4

=item run

B<>

 Usage: run SUB

Main action method

=back

=head1 INTERNAL

=begin html

<table><tr><td>
<a class="methlink" href="#item_autoload">AUTOLOAD</a>

</td><td>
<a class="methlink" href="#item_destroy">DESTROY</a>

</td><td>
<a class="methlink" href="#item__loadconf">_loadconf</a>

</td></tr></table>

=end html


=over 4

=item AUTOLOAD

B<>

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


=back

=over 4

=item DESTROY

B<>

 Usage: DESTROY

Defining this function prevents it from being searched in AUTOLOAD

=back

=over 4

=item _loadconf

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



=back

=head1 AUTHOR



Ryan Gies

=head1 COPYRIGHT



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

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

=head1 UPDATED

This file created by  on  at 

=cut
