NAME

Clustericious::Config::Helpers - Helpers for clustericious config files.

VERSION

version 1.05

SYNOPSIS

 ---
 % extend_config 'SomeOtherConfig';

DESCRIPTION

This module provides the functions available in all configuration files using Clustericious::Config.

FUNCTIONS

extends_config $config_name, %arguments

Extend the config using another config file.

get_password

Prompt for a password. This will prompt the user the first time it is encountered for a password.

home( [ $user ] )

Return the given users' home directory, or if no user is specified return the calling user's home directory.

file( @list )

The file shortcut from Path::Class, if it is installed.

dir( @list )

The dir shortcut from Path::Class, if it is installed.

hostname

The system hostname (uses Sys::Hostname)

hostname_full

The system hostname in full, including the domain, if it can be determined (uses Sys::Hostname).

json $ref

Encode the given hash or list reference.

yaml $ref

Encode the given hash or list reference.

address( [ $interface ] )

Returns a list of IP addresses. Requires Sys::HostAddr to be installed. $interfaces, if specified may be either a string or regular expression. For example you can do address qr{^en[0-9]+$} on Linux to get only ethernet interfaces.

By default does not return loop back interfaces.

Only returns IPv4 addresses.

public_address

Returns the public IPv4 address. May not be an address on your host, if you are behind a firewall. Requires Sys::HostAddr to be installed.

interface

Returns a list of network interfaces. Requires Sys::HostAddr to be installed.

By default does not return loop back interfaces.

SEE ALSO

Clustericious::Config, Clustericious

AUTHOR

Original author: Brian Duggan

Current maintainer: Graham Ollis <plicease@cpan.org>

Contributors:

Curt Tilmes

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by NASA GSFC.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.