Chart::OFC2::Types - constrainted types and coercions for Chart::OFC2
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" ] } });
An integer greater than 0
subtype of Chart::OFC2::Labels
Coerces from HashRef via "new" in Chart::OFC2::Labels
Jeff Tam
To install Chart::OFC2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Chart::OFC2
CPAN shell
perl -MCPAN -e shell install Chart::OFC2
For more information on module installation, please visit the detailed CPAN module installation guide.