{
    "content": [
        {
            "type": "text",
            "text": "# Net::Netrc (perldoc)\n\n## NAME\n\nNet::Netrc - OO interface to users netrc file\n\n## SYNOPSIS\n\nuse Net::Netrc;\n$mach = Net::Netrc->lookup('some.machine');\n$login = $mach->login;\n($login, $password, $account) = $mach->lpa;\n\n## DESCRIPTION\n\n\"Net::Netrc\" is a class implementing a simple interface to the .netrc file used as by the ftp\nprogram.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (3 subsections)\n- **EXPORTS**\n- **KNOWN BUGS**\n- **SEE ALSO**\n- **AUTHOR**\n- **COPYRIGHT**\n- **LICENCE**\n- **VERSION**\n- **DATE**\n- **HISTORY**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Net::Netrc",
        "section": "",
        "mode": "perldoc",
        "summary": "Net::Netrc - OO interface to users netrc file",
        "synopsis": "use Net::Netrc;\n$mach = Net::Netrc->lookup('some.machine');\n$login = $mach->login;\n($login, $password, $account) = $mach->lpa;",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 8,
                "subsections": [
                    {
                        "name": "The .netrc File",
                        "lines": 33
                    },
                    {
                        "name": "Class Methods",
                        "lines": 14
                    },
                    {
                        "name": "Object Methods",
                        "lines": 12
                    }
                ]
            },
            {
                "name": "EXPORTS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "KNOWN BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "LICENCE",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DATE",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "HISTORY",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Net::Netrc - OO interface to users netrc file\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Net::Netrc;\n\n$mach = Net::Netrc->lookup('some.machine');\n$login = $mach->login;\n($login, $password, $account) = $mach->lpa;\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "\"Net::Netrc\" is a class implementing a simple interface to the .netrc file used as by the ftp\nprogram.\n\n\"Net::Netrc\" also implements security checks just like the ftp program, these checks are, first\nthat the .netrc file must be owned by the user and second the ownership permissions should be\nsuch that only the owner has read and write access. If these conditions are not met then a\nwarning is output and the .netrc file is not read.\n",
                "subsections": [
                    {
                        "name": "The .netrc File",
                        "content": "The .netrc file contains login and initialization information used by the auto-login process. It\nresides in the user's home directory. The following tokens are recognized; they may be separated\nby spaces, tabs, or new-lines:\n\nmachine name\nIdentify a remote machine name. The auto-login process searches the .netrc file for a\nmachine token that matches the remote machine specified. Once a match is made, the\nsubsequent .netrc tokens are processed, stopping when the end of file is reached or an-\nother machine or a default token is encountered.\n\ndefault\nThis is the same as machine name except that default matches any name. There can be only one\ndefault token, and it must be after all machine tokens. This is normally used as:\n\ndefault login anonymous password user@site\n\nthereby giving the user automatic anonymous login to machines not specified in .netrc.\n\nlogin name\nIdentify a user on the remote machine. If this token is present, the auto-login process will\ninitiate a login using the specified name.\n\npassword string\nSupply a password. If this token is present, the auto-login process will supply the\nspecified string if the remote server requires a password as part of the login process.\n\naccount string\nSupply an additional account password. If this token is present, the auto-login process will\nsupply the specified string if the remote server requires an additional account password.\n\nmacdef name\nDefine a macro. \"Net::Netrc\" only parses this field to be compatible with *ftp*.\n"
                    },
                    {
                        "name": "Class Methods",
                        "content": "The constructor for a \"Net::Netrc\" object is not called new as it does not really create a new\nobject. But instead is called \"lookup\" as this is essentially what it does.\n\n\"lookup($machine[, $login])\"\nLookup and return a reference to the entry for $machine. If $login is given then the entry\nreturned will have the given login. If $login is not given then the first entry in the\n.netrc file for $machine will be returned.\n\nIf a matching entry cannot be found, and a default entry exists, then a reference to the\ndefault entry is returned.\n\nIf there is no matching entry found and there is no default defined, or no .netrc file is\nfound, then \"undef\" is returned.\n"
                    },
                    {
                        "name": "Object Methods",
                        "content": "\"login()\"\nReturn the login id for the netrc entry\n\n\"password()\"\nReturn the password for the netrc entry\n\n\"account()\"\nReturn the account information for the netrc entry\n\n\"lpa()\"\nReturn a list of login, password and account information for the netrc entry\n"
                    }
                ]
            },
            "EXPORTS": {
                "content": "*None*.\n",
                "subsections": []
            },
            "KNOWN BUGS": {
                "content": "See <https://rt.cpan.org/Dist/Display.html?Status=Active&Queue=libnet>.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Net::Cmd.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Graham Barr <gbarr@pobox.com <mailto:gbarr@pobox.com>>.\n\nSteve Hay <shay@cpan.org <mailto:shay@cpan.org>> is now maintaining libnet as of version\n1.2202.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (C) 1995-1998 Graham Barr. All rights reserved.\n\nCopyright (C) 2013-2014, 2020 Steve Hay. All rights reserved.\n",
                "subsections": []
            },
            "LICENCE": {
                "content": "This module is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself, i.e. under the terms of either the GNU General Public License or the Artistic\nLicense, as specified in the LICENCE file.\n",
                "subsections": []
            },
            "VERSION": {
                "content": "Version 3.13\n",
                "subsections": []
            },
            "DATE": {
                "content": "23 Dec 2020\n",
                "subsections": []
            },
            "HISTORY": {
                "content": "See the Changes file.\n",
                "subsections": []
            }
        }
    }
}