NAME
Stencil::Data
ABSTRACT
Represents the generator specification
SYNOPSIS
use Stencil::Repo;
use Stencil::Data;
my $repo = Stencil::Repo->new;
$repo->store->mkpath;
my $spec = Stencil::Data->new(name => 'foo', repo => $repo);
# $spec->read;
# $spec->write($data);
DESCRIPTION
This package provides a spec class which represents the generator specification.
LIBRARIES
This package uses type constraints from:
ATTRIBUTES
This package has the following attributes:
file
file(Object)
This attribute is read-only, accepts (Object)
values, and is optional.
name
name(Str)
This attribute is read-only, accepts (Str)
values, and is required.
repo
repo(Object)
This attribute is read-only, accepts (Object)
values, and is required.
METHODS
This package implements the following methods:
read
read() : HashRef
The read method reads the generator specification (yaml) file and returns the data.
write
write(HashRef $data) : InstanceOf["Path::Tiny"]
The write method write the generator specification (yaml) file and returns the file written.
AUTHOR
Al Newkirk, awncorp@cpan.org
LICENSE
Copyright (C) 2011-2019, Al Newkirk, et al.
This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".