Upgrade to Pro — share decks privately, control downloads, hide ads and more …

クラスビルダの話とMongoDB.pm

 クラスビルダの話とMongoDB.pm

mackee

May 17, 2013
Tweet

More Decks by mackee

Other Decks in Programming

Transcript

  1. PerlͰΫϥεΛ࡞Δ Ϟδϡʔϧແ͠ͰΫϥεΛ࡞Δʹ͸ package Sheep { sub new { my $class

    = shift; my $self = { color => “white” }; return bless $self, $class; } } ৄ͘͠͸perldocͷperlbootͱ͔ 13೥5݄30೔໦༵೔
  2. MouseͰ͕Μ͹Δ package Sheep { use Mouse; has color => (

    is => ‘rw’, isa => ‘Str’, default => sub { ‘white’ }, ); no Mouse; } 13೥5݄30೔໦༵೔