WHAT IS THIS?

Object::Simple provide new() and accessor creating methods.

INSTALLATION

cpan Object::Simple

SYNOPSIS

    package Point;
    
    use strict;
    use warnings;
    
    use base 'Object::Simple';

    __PACKAGE__->attr(x => 0);
    __PACKAGE__->attr(y => 0);
    
    sub clear {
        my $self = shift;
        
        $self->x(0);
        $self->y(0);
    }
    
    package Point3D;
    
    use strict;
    use warnings;
    
    use base 'Point';
    
    __PACKAGE__->attr(z => 0);
    
    sub clear {
        my $self = shift;
        $self->SUPER::clear();
        $self->z(0);
    }
    
    package main;
    
    use strict;
    use warnings;
    
    my $point = Point3D->new(x => 4, y => 6, z => 5);
    
    $point->x(1);
    $point->y(2);
    $point->z(5);
    
    my $x = $point->x;
    my $y = $point->y;
    my $z = $point->z;
    
    $point->clear;

FEATURES

This module has the folloing features. 

1. new() and accessor creating methods is prepared.
2. Default value is available.
3. Object Oriented interface and pure perl implemetation.
4. Memory saving implementation and fast Compiling.
5. Debugging is easy.

COPYRIGHT AND LICENCE

Copyright (C) 2008 Yuki Kimoto
http://d.hatena.ne.jp/perlcodesample/ ( Japanese )

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

