SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from Old RedHat 6.X libnet-1.0606-1.i386.rpm

Net::Netrc

Section: User Contributed Perl Documentation (3)
Updated: perl 5.005, patch 03
Index 

NAME

Net::Netrc - OO interface to users netrc file 

SYNOPSIS

    use Net::Netrc;        $mach = Net::Netrc->lookup('some.machine');    $login = $mach->login;    ($login, $password, $account) = $mach->lpa;
 

DESCRIPTION

Net::Netrc is a class implementing a simple interface to the .netrc fileused as by the ftp program.

Net::Netrc also implements security checks just like the ftp program,these checks are, first that the .netrc file must be owned by the user and second the ownership permissions should be such that only the owner hasread and write access. If these conditions are not met then a warning isoutput and the .netrc file is not read. 

THE .netrc FILE

The .netrc file contains login and initialization information used by theauto-login process. It resides in the user's home directory. The followingtokens are recognized; they may be separated by spaces, tabs, or new-lines:
machine name
Identify a remote machine name. The auto-login process searchesthe .netrc file for a machine token that matches the remote machinespecified. Once a match is made, the subsequent .netrc tokensare processed, stopping when the end of file is reached or an-other machine or a default token is encountered.
default
This is the same as machine name except that default matchesany name. There can be only one default token, and it must beafter all machine tokens. This is normally used as:

    default login anonymous password userAATTsite
thereby giving the user automatic anonymous login to machinesnot specified in .netrc.
login name
Identify a user on the remote machine. If this token is present,the auto-login process will initiate a login using thespecified name.
password string
Supply a password. If this token is present, the auto-loginprocess will supply the specified string if the remote serverrequires a password as part of the login process.
account string
Supply an additional account password. If this token is present,the auto-login process will supply the specified stringif the remote server requires an additional account password.
macdef name
Define a macro. Net::Netrc only parses this field to be compatiblewith ftp.
 

CONSTRUCTOR

The constructor for a Net::Netrc object is not called new as it does notreally create a new object. But instead is called lookup as this isessentially what it does.
lookup ( MACHINE [, LOGIN ])
Lookup and return a reference to the entry for MACHINE. If LOGIN is giventhen the entry returned will have the given login. If LOGIN is not given thenthe first entry in the .netrc file for MACHINE will be returned.

If a matching entry cannot be found, and a default entry exists, then areference to the default entry is returned.

 

METHODS


login ()
Return the login id for the netrc entry
password ()
Return the password for the netrc entry
account ()
Return the account information for the netrc entry
lpa ()
Return a list of login, password and account information fir the netrc entry
 

AUTHOR

Graham Barr <gbarrAATTpobox.com> 

SEE ALSO

the Net::Netrc manpagethe Net::Cmd manpage 

COPYRIGHT

Copyright (c) 1995-1998 Graham Barr. All rights reserved.This program is free software; you can redistribute it and/or modifyit under the same terms as Perl itself.


 

Index

NAME
SYNOPSIS
DESCRIPTION
THE .netrc FILE
CONSTRUCTOR
METHODS
AUTHOR
SEE ALSO
COPYRIGHT

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