NAME

Chart::OFC2::Types - constrainted types and coercions for Chart::OFC2

SYNOPSIS

package Chart::OFC2::Demo;

use Moose; use Chart::OFC2::Types qw( PositiveInt ChartOFC2Labels );

has 'attribute1' => ( is => 'rw', isa => PositiveInt, ); has 'attribute2' => ( is => 'rw', isa => ChartOFC2Labels, coerce => 1 );

1;

use Chart::OFC2::Demo; my $demo = Chart::OFC2::Demo->new({ attribute1 => 4, attribute2 => { labels => [ "Jan", "Feb", "Mar", "Apr", "May" ] } });

TYPES

PositiveInt

An integer greater than 0

ChartOFC2Labels

subtype of Chart::OFC2::Labels

Coerces from HashRef via "new" in Chart::OFC2::Labels

AUTHOR

Jeff Tam