1# $Id$ 2 3package Google::Chart::Type::Pie; 4use Moose; 5use Moose::Util::TypeConstraints; 6 7with 'Google::Chart::Type::Simple'; 8 9has 'pie_type' => ( 10 is => 'rw', 11 isa => enum([ qw(2d 3d) ]), 12 required => 1, 13 default => '2d' 14); 15 16__PACKAGE__->meta->make_immutable; 17 18no Moose; 19no Moose::Util::TypeConstraints; 20 21sub parameter_value { 22 my $self = shift; 23 24 return $self->pie_type eq '3d' ? 'p3' : 'p'; 25} 26 271; 28 29__END__ 30 31=head1 NAME 32 33Google::Chart::Type::Pie - Google::Chart Pie Chart Type 34 35=head1 SYNOPSIS 36 37 Google::Chart->new( 38 type => 'Pie' 39 ); 40 41 Google::Chart->new( 42 type => { 43 module => 'Pie', 44 args => { 45 pie_type => '3d' 46 } 47 } 48 ); 49 50=head1 METHODS 51 52=head2 parameter_value 53 54=cut