YAPC::2004::Israel << Previous | Index | Next >> Copyright © 2004 Gaal Yahas

Class::Accessor


  • Pure Perl

  • Easy interface

     package TrafficLight;
     use base 'Class::Accessor';
     __PACKAGE__->mk_accessors(qw/color/);
     $light->color("yellow");
     print "The light was " . $light->color . ", sir";

continued...