.netrc file parser module for Perl 6
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib/Config Support of Writer function. Jun 19, 2016
t More tests Jun 14, 2016
.gitignore Initial commit Jun 12, 2016
.travis.yml Use zef instead of panda May 17, 2017
LICENSE Initial commit Jun 12, 2016
META6.json Set proper version Aug 11, 2017
README.md Readme update Jun 29, 2016



Config::Netrc - module for parsing of Netrc configuration files.


use Config::Netrc;
say Config::Netrc::parse-file('my-example.netrc');


There are basically two main functions: parse and parse-file. First function takes a string of netrc-file content and returns to you a hash with some signature or Nil value if parser failed.

This hash contains of two arrays: comments and entries. In the section comments you will get all comment strings(without leading #) and in the entries section you get array of hashes with this structure:

machine  => {value => val, comment => my-comment},
login    => {value => val, comment => my-comment},
password => {value => val, comment => my-comment}

Of course, login or password lines are optional and comment entry for lines like following:

machine val # my-comment

is also optional.

You will be able to use this hash to determine state of user's Netrc file state.


  • Detection of user's config file at his home directory


This library is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0