Pantry::Model::Role - Pantry data model for Chef roles
version 0.007
Under development.
This attribute holds role default attribute data as key-value pairs. Keys may be separated by a period to indicate nesting (literal periods must be escaped by a backslash). Values should be scalars or array references.
This attribute holds role override attribute data as key-value pairs. Keys may be separated by a period to indicate nesting (literal periods must be escaped by a backslash). Values should be scalars or array references.
$role->set_default_attribute("nginx.port", 80);
Sets the role default attribute for the given key to the given value.
my $port = $role->get_default_attribute("nginx.port");
Returns the role default attribute for the given key.
$role->delete_default_attribute("nginx.port");
Deletes the role default attribute for the given key.
$role->set_override_attribute("nginx.port", 80);
Sets the role override attribute for the given key to the given value.
my $port = $role->get_override_attribute("nginx.port");
Returns the role override attribute for the given key.
$role->delete_override_attribute("nginx.port");
Deletes the role override attribute for the given key.
Saves the node to a file in the pantry. If the private _path attribute has not been set, an exception is thrown.
_path
David Golden <dagolden@cpan.org>
This software is Copyright (c) 2011 by David Golden.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
To install Pantry, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pantry
CPAN shell
perl -MCPAN -e shell install Pantry
For more information on module installation, please visit the detailed CPAN module installation guide.