David Golden

NAME

Pantry::Model::Environment - Pantry data model for Chef environments

VERSION

version 0.012

DESCRIPTION

Under development.

ATTRIBUTES

default_attributes

This attribute holds environment 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.

override_attributes

This attribute holds environment 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.

METHODS

set_default_attribute

  $environment->set_default_attribute("nginx.port", 80);

Sets the environment default attribute for the given key to the given value.

get_default_attribute

  my $port = $environment->get_default_attribute("nginx.port");

Returns the environment default attribute for the given key.

delete_default_attribute

  $environment->delete_default_attribute("nginx.port");

Deletes the environment default attribute for the given key.

set_override_attribute

  $environment->set_override_attribute("nginx.port", 80);

Sets the environment override attribute for the given key to the given value.

get_override_attribute

  my $port = $environment->get_override_attribute("nginx.port");

Returns the environment override attribute for the given key.

delete_override_attribute

  $environment->delete_override_attribute("nginx.port");

Deletes the environment override attribute for the given key.

save

Saves the node to a file in the pantry. If the private _path attribute has not been set, an exception is thrown.

AUTHOR

David Golden <dagolden@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2011 by David Golden.

This is free software, licensed under:

  The Apache License, Version 2.0, January 2004