SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from Old RedHat 7.X perl-Unix-ConfigFile-0.05-8.i386.rpm

AliasFile

Section: User Contributed Perl Documentation (3)
Updated: perl v5.6.0
Index 

NAME

Unix::AliasFile - Perl interface to /etc/aliases format files 

SYNOPSIS

  use Unix::AliasFile;
  $al = new Unix::AliasFile, "/etc/aliases";  $al->alias("bozos", @members);  $al->delete("deadlist");  $al->remove_user("coolmail", "bgates", "badguy");  $al->add_user("coolmail", "joecool", "goodguy");  $al->remove_user("*", "deadguy");  $al->commit();  undef $al;
 

DESCRIPTION

The Unix::AliasFile module provides an abstract interface to Unix alias files.It automatically handles file locking, getting colons and commas in the rightplaces, and all the other niggling details.

Unlike some of the other Unix::*File modules, this module will preserve theorder of your alias file, with a few exceptions. Comments and aliases willappear in the file in the same order that they started in, unless you havecomment lines interspersed between the beginning of an alias and continuationlines for that same alias. In this case, those comments will appear after thealias that contains them. 

METHODS

 

add_user( ALIAS, @USERS )

This method will add the list of users to an existing alias. Users that arealready members of the alias are silently ignored. The special alias name *will add the users to every alias. Returns 1 on success or 0 on failure. 

alias( ALIAS [,@USERS] )

This method can add, modify, or return information about an alias. Suppliedwith a single alias parameter, it will return a list consisting of the membersof that alias, or undef if no such alias exists. If you supply moreparameters, the named alias will be created or modified if it already exists.The member list is also returned to you in this case. 

aliases( )

This method returns a list of all existing aliases. The list will be sortedin alphabetical order. In scalar context, this method returns the totalnumber of aliases. 

comment( ALIAS, COMMENT )

This method inserts a comment line before the specified alias. You mustsupply your own comment marker (#) but a newline will be automaticallyappended to the comment unless it already has one. Returns 1 on successand 0 on failure. 

commit( [BACKUPEXT] )

See the Unix::ConfigFile documentation for a description of this method. 

delempty( )

This method will delete all existing aliases that have no members. It returnsa count of how many aliases were deleted. 

delete( ALIAS )

This method will delete the named alias. It has no effect if the suppliedalias does not exist. 

new( FILENAME [,OPTIONS] )

See the Unix::ConfigFile documentation for a description of this method. 

remove_user( ALIAS, @USERS )

This method will remove the list of users from an existing alias. Users thatare not members of the alias are silently ignored. The special alias name *will remove the users from every alias. Returns 1 on success or 0 on failure. 

rename_user( OLDNAME, NEWNAME )

This method will change one username to another in every alias. Returns thenumber of aliases affected. 

uncomment( COMMENT )

Remove the comment from the file that matches the supplied text. The matchmust be exact. Returns 1 on success and 0 on failure. 

BUGS

While the Unix::AliasFile module will work with Perl versions prior to 5.005,it may exhibit a minor bug under those versions. The bug will cause programaliases with embedded comma characters to be broken apart. This will nothappen under 5.005 and up, due to the use of the Text::ParseWords module,which changed significantly with the 5.005 release. 

AUTHOR

Steve Snodgrass, ssnodgraAATTfore.com 

SEE ALSO

Unix::AutomountFile, Unix::ConfigFile, Unix::GroupFile, Unix::PasswdFile


 

Index

NAME
SYNOPSIS
DESCRIPTION
METHODS
add_user( ALIAS, @USERS )
alias( ALIAS [,@USERS] )
aliases( )
comment( ALIAS, COMMENT )
commit( [BACKUPEXT] )
delempty( )
delete( ALIAS )
new( FILENAME [,OPTIONS] )
remove_user( ALIAS, @USERS )
rename_user( OLDNAME, NEWNAME )
uncomment( COMMENT )
BUGS
AUTHOR
SEE ALSO

This document was created byman2html,using the manual pages.
 
ICM Bot detect detector