CfgTie::TieProto, CfgTie::TieProto_num -- Ties the protocol number file to a PERL hash
tie %proto, 'CfgTie::TieProto'; print $proto{'tcp'};
This is a straightforward hash tie that allows us to access the protocol number database sanely.
There are two ties available for programmers:
tie %proto,'CfgTie::TieProto'
$proto{$name} will return a hash reference of the named protocol information
$proto{$name}
tie %proto_num,'CfgTie::TieProto_num'
$proto_num{$num} will return a hash reference for the specified protocol number.
$proto_num{$num}
Any given proto entry has the following information assoicated with it:
Name
proto name
Aliases
A list reference for other names for this proto
Number
The protocol number
Additionally, the programmer can set any other associated key, but this information will only be available to the running Perl script.
CfgTie::Cfgfile, CfgTie::TieAliases, CfgTie::TieGeneric, CfgTie::TieGroup, CfgTie::TieHost, CfgTie::TieNamed, CfgTie::TieNet, CfgTie::TiePh, CfgTie::TieProto, CfgTie::TieServ, CfgTie::TieShadow, CfgTie::TieUser
The current version does cache some proto 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.