Description | A static content generator. |
Newcomen::Role::Backend::Specification - Moose role for backend specifications.
package Newcomen::Foo::Specification; use namespace::autoclean; use Moose; with 'Newcomen::Role::Backend::Specification'; __PACKAGE__ -> meta () -> make_immutable (); 1;
This role will add the attributes name and options and the methods mentioned below to the consuming class. The name attribute is of the string type, options is an Newcomen::Data instance. Both will be read only, and name will be required (i.e. it has to be supplied to the consuming class' constructor). It will not be possible to set the options from the constructor, an empty Newcomen::Data instance will be used initially.
Consuming this role is sufficient for a complete backend specification class, see SYNOPSIS for an example.
my $name = $spec -> name ();
Returns the name set for the backend specification. The name can only be set using the constructor.
The backend options are stored in an Newcomen::Data instance. Supported options may differ for different backends, see the individual backends for details.
The methods delete(), exists(), get() and set() are mapped to the Newcomen::Data methods of the same name, see there for details.
my $options = $spec -> options ();
Returns the Newcomen::Data instance storing the options. The options will be empty initially.
This is version 2014052501
.
Stefan Goebel - newcomen {at} subtype {dot} de
Copyright 2013-2014 Stefan Goebel.
This file is part of Newcomen.
Newcomen is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the license, or (at your option) any later version.
Newcomen is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Newcomen. If not, see <http://www.gnu.org/licenses/>.