.netrc file parser module for Perl 6
Perl 6
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
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
LICENSE Initial commit Jun 12, 2016
META6.json Set proper version Aug 11, 2017
README.md Readme update Jun 29, 2016

README.md

NAME

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

SYNOPSIS

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

DESCRIPTION

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.

TODO

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

COPYRIGHT

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