CfgTie::TieGeneric -- A generic hash that automatically binds others


NAME

CfgTie::TieGeneric -- A generic hash that automatically binds others


SYNOPSIS

This is an associative array that automatially ties other configuration hashes


DESCRIPTION

This is a tie to bring other ties together automatically so you, the busy programmer and/or system administrator, don't have to. The related Perl module is not loaded unless it is needed at runtime.

        my %gen;
        tie %gen, 'CfgTie::TieGeneric';

Primary, or well-known, keys

env
This refers directly to the ENV hash.

group
mail
This is a special key. It forms a hash, with subkeys. See below for more information

net
This is a special key. It forms a hash with additional subkeys. See below for more details.

user
This is a link to the TieUser module (the CfgTie::TieUser manpage).

Composite
Composite primary keys are just like absolute file paths. For example, if you wanted to do something like this:
        my %lusers = $gen{'user'};
        my $Favorite_User = $lusers{'mygirl'};

You could just do:

        my $Favorite_User = $gen{'/users/mygirl'};

others...
These are the things automatically included in. This will be described below.

Subkeys for mail

aliases
the CfgTie::TieAliases manpage

Subkeys for net

host
the CfgTie::TieHost manpage

service
the CfgTie::TieServ manpage

protocol
the CfgTie::TieProto manpage

addr
the CfgTie::TieNet manpage

How other ties are automatically bound

Other keys are automatically (if it all possible) brought in using the following procedure:

  1. If it is something already linked to it, that thingy is automatically returned (of course).
  2. If the key is simple, like AABot, we will try to use AABot; If that works we will tie it and return the results.
  3. If the key is more complex, like /OS3/Config, we will try to see if OS3 is already tied (and try to tie it, like above, if not). If that works, we will just look up Config in that hash. If it does not work, we will try to use and tie OS3::Config, OS3::TieConfig, and OS3::ConfigTie. If any of those work, we return the results.
  4. Otherwise, undef will be returned.


See Also

the CfgTie::TieAliases manpage, the CfgTie::TieGroup manpage, the CfgTie::TieHost manpage, the CfgTie::TieMTab manpage, the CfgTie::TieNamed manpage, the CfgTie::TieNet manpage, the CfgTie::TiePh manpage, the CfgTie::TieProto manpage, the CfgTie::TieRCService manpage, the CfgTie::TieRsrc manpage, the CfgTie::TieServ manpage, the CfgTie::TieShadow manpage, the CfgTie::TieUser manpage


Author

Randall Maas (mailto:randym@acm.org, http://www.hamline.edu/~rcmaas/)

 CfgTie::TieGeneric -- A generic hash that automatically binds others