CatalystX::Features::Role::Feature - Role for implementing a single feature.


CatalystX-Features documentation Contained in the CatalystX-Features distribution.

Index


Code Index:

NAME

Top

CatalystX::Features::Role::Feature - Role for implementing a single feature.

VERSION

Top

version 0.20

DESCRIPTION

Top

This role is an interface. No code here.

REQUIRED ATTRIBUTES

Top

path

Needed by the constructor. Receives a full path to the feature, i.e.

	/home/myapp/features/my.simple.feature_1.0.0

backend

Needed by the constructor. Passed the instance of the controller. Should have a type of CatalystX::Features::Role::Backend.

	has 'backend' => ( is=>'ro', isa=>'CatalystX::Features::Role::Backend', required=>1 );

REQUIRED METHODS

Top

id

The last folder in the feature path, say my.feature_1.0. It's used as a unique identifier for this feature.

name

The name of the feature, say my.simple.feature. This is also a unique identifier application wide. There should not exist 2 or more features with the same name loaded at any given time.

version

A version token of any format.

version_number

A version long integer that can be compared easily.

root

Returns the full path to the /root dir for a given feature. Used by many View modifiers.

lib

Returns the full path of the /lib dir for a given feature. Used by @INC modifiers or any plugins.

AUTHORS

Top

	Rodrigo de Oliveira (rodrigolive), C<rodrigolive@gmail.com>

LICENSE

Top

This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.


CatalystX-Features documentation Contained in the CatalystX-Features distribution.

package CatalystX::Features::Role::Feature;
$CatalystX::Features::Role::Feature::VERSION = '0.20';
use Moose::Role;

# attributes
requires 'path';
requires 'backend';

# methods
requires 'id';
requires 'name';
requires 'version';
requires 'version_number';
requires qw/root lib t/;

1;