Group
Extension

Matches 3

Chef ( H/HO/HOLOWAY/Chef-0.01.tar.gz, HOLOWAY, 2009; MetaCPAN )
Chef/lib/Chef.pm ( view source; MetaCPAN )
package Chef;

use Chef::Recipe;
use Chef::Resource;
use Data::Dumper;
use JSON::Any qw(XS JSON DWIW);

require Exporter;
@ISA    = qw(Exporter);
@EXPORT = qw(resource node);

use warnings;
use strict
{
  my $data;
  while ( my $line = <STDIN> ) {
    $data = $data . $line;
  }
  $node_data = JSON::Any->jsonToObj($data);
  1;
}

=head2 resource

Create a new Chef Resource.  Valid resources are list
resource);
}

sub send_to_chef {
  print JSON::Any->objToJson(
    {
      node                => $node_data,
      resource_collection => $recipe->prepare_json
    }
  );
}

sub END {
  send_to_chef;
Chef ( H/HO/HOLOWAY/Chef-0.01.tar.gz, HOLOWAY, 2009; MetaCPAN )
Chef/lib/Chef/Recipe.pm ( view source; MetaCPAN )
package Chef::Recipe;

use warnings;
use strict;

use Moose;
use JSON;
use Data::Dumper;

has 'resource_collection' =>
  ( is => 'rw', isa => 'ArrayRef', default => sub { [] } );

sub add_resource {
 
}

sub prepare_json {
  my $self = shift;
  my @resource_collection;
  foreach my $resource ( @{ $self->resource_collection } ) {
    push( @resource_collection, $resource->prepare_json );
  }
  retur
Chef ( H/HO/HOLOWAY/Chef-0.01.tar.gz, HOLOWAY, 2009; MetaCPAN )
Chef/lib/Chef/Resource.pm ( view source; MetaCPAN )
y $bit (@parts) {
    $class = $class . '::' . ucfirst($bit);
  }
  return $class;
}

sub prepare_json {
  my $self = shift;
  my $cr   = {};
  $cr->{'instance_vars'} = { '@name' => $self->name, };
  
options } ) ) {
    $cr->{'instance_vars'}->{ "@" . $key } = $self->options->{$key};
  }
  $cr->{'json_class'} = $self->ruby_class;
  return $cr;
}

sub AUTOLOAD {
  my $self = shift;
  my $attr = $Ch

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.