The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

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

VERSION

version 1.25

SYNOPSIS

 ---
 % extend_config 'SomeOtherConfig';

DESCRIPTION

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

FUNCTIONS

extends_config

 % extends_config $config_name, %arguments

Extend the config using another config file.

get_password

 <%= get_password %>

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

home

 <%= home %>
 <%= home $user %>

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

file

 <%= file @list %>

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

dir

 <%= dir @list %>

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

hostname

 <%= hostname %>

The system hostname (uses Sys::Hostname)

hostname_full

 <%= hostname_full %>

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

json

 <%= json $ref %>

Encode the given hash or list reference.

yaml

 <%= yaml $ref %>

Encode the given hash or list reference.

address

 <%= address %>
 <%= 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

 <%= 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

 <%= join ' ', interfaces %>

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.