CfgTie::TieServ -- A HASH tie that allows access the service port database
tie %serv,'CfgTie::TieServ'; print $serv{'smtp'};
This is a straight forward HASH tie that allows us to access the service port database sanely.
There are two ties available for programers:
tie %serv,'CfgTie::TieServ'
$serv{$name} will return a HASH reference of the named service information
$serv{$name}
tie %serv_port,'CfgTie::TieServ_port'
$serv_port{$port} will return a HASH reference for the specified service port.
$serv_port{$port}
Any given serv entry has the following information assoicated with it:
Name
Service name
Aliases
A list reference for other names for this service
Port
The port number
Protocol
The protocol name
Additionally, the programmer can set any other associated key, but this information will only available to running PERL script.
CfgTie::Cfgfile, CfgTie::TieAliases, CfgTie::TieGeneric, CfgTie::TieGroup, CfgTie::TieHost, CfgTie::TieNamed, CfgTie::TieNet, CfgTie::TiePh, CfgTie::TieProto, CfgTie::TieShadow, CfgTie::TieUser
The current version does cache some service information.
Randall Maas (randym@acm.org)
To install Secure::File, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Secure::File
CPAN shell
perl -MCPAN -e shell install Secure::File
For more information on module installation, please visit the detailed CPAN module installation guide.