typo発見

0 座標位置を指定する毛筆の方法は、→0 座標位置を指定するもう一つの方法は、
http://code.google.com/intl/ja/apis/chart/
ということでGoogle::Chart::Gridなど実装してみる。→うむ。こんな感じか。

う。0座標位置はchgじゃなくてchmで指定するべきだったか。帰って続きするか。→うをー。なんかすごくめんどくさそうな予感。ArrayRef[markerdata]とかになる悪寒。

subtype 'Google::Chart::Color::Data'
    => as 'Str'
    => where { /^[a-f0-9]{6}/i }
;

has 'color' => (
    is => 'rw',
    isa => 'Google::Chart::Color::Data',
    required => 1,
    default => '000000',
);

これが

t/02_marker....1/10 Attribute (color) does not pass the type constraint because: Validation failed for 'Google::Chart::Color::Data' failed with value 0 at (eval 89) line 48
        Google::Chart::Marker::Item::new('Google::Chart::Marker::Item') called at /home/danjou/work/share/lang/perl/Google-Chart/trunk/lib/Google/Chart/Marker.pm line 25
        Google::Chart::Marker::__ANON__('Google::Chart::Marker=HASH(0x8f5cdf0)') called at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Class/MOP/Attribute.pm line 239
        Class::MOP::Attribute::default('Moose::Meta::Attribute=HASH(0x904690c)', 'Google::Chart::Marker=HASH(0x8f5cdf0)') called at (eval 82) line 19
        Google::Chart::Marker::new('Google::Chart::Marker') called at t/02_marker.t line 10

こうなってなんやこれー!と思っていろいろやってたんだけど、defaultを'aaaaaa'とか(とにかくゼロではない何か)に変えたらとおった...→ひどす。なんでじゃろー。→その後、id:lestrratによりこうやって解決。一時しのぎではある。

has 'color' => (
    is => 'rw',
    isa => 'Google::Chart::Color::Data',
    required => 1,
    default => sub {'000000'},
);