Class::MethodsObject methods for working with classes | |
Download |
Class::Methods Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Richard Soderberg
- Publisher web site:
- http://search.cpan.org/~rsod/
Class::Methods Tags
Class::Methods Description
Object methods for working with classes Class::Methods is a Perl module with object methods for working with classes.Developer commentsAfter discussing Ruby with Simon, I wrote this module to implement OO in Perl via the builtin inheritance-based method system.It seems to be pretty fun to work with. Kind of resesmbles ruby, though, and I suspect it might start enroaching on Perl 6.This is the first release, to share the madness with y'all. I've planned serious uses of this module, so perhaps it'll find a good home.test.pl is the only code example right. The core's small, and fun to read.SYNOPSIS use Class::Methods; my $container = bless [], Class::Methods->new( count => sub { return scalar @{$_} }, ); print $container->count; # prints 0 $container->extend( push => sub { push @{$_}, $_ } ); $container->push( qw ); $container->remove( "push" ); print $container->count; # prints 2 # XXX: $container->base('ARRAY'); # import push(), pop(), splice(), etc. Requirements: · Perl
Class::Methods Related Software