Help for this page

Select Code to Download


  1. or download this
    package Objet; # yes, the 'c' is absent by design;
    use strict;
    ...
    }
    
    1;
    
  2. or download this
    use Objet;
    my $o = Objet->new('aleph' => 1, 'gamma' => 2);
    
    $o->attrib( 'zeta' => 900 ); # sets attribute 'zeta' to 900
    print $o->attrib( 'aleph' ); # gets value of attrib 'aleph'
    
  3. or download this
    sub new {
       my $self = bless {
    ...
          return $self->{$attr}{get}->();
       }
    }