Class::Modular

Modular class generation superclass
Download

Class::Modular Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Don Armstrong
  • Publisher web site:
  • http://search.cpan.org/~don/

Class::Modular Tags


Class::Modular Description

Modular class generation superclass Class::Modular is a superclass for generating modular classes, where methods can be added into the class from the perspective of the object, rather than the perspective of the class.That is, you can create a class which has a set of generic common functions. Less generic functions can be included or overridden without modifying the base classes. This allows for code to be more modular, and reduces code duplication.The Class::Modular module attempts to fill the middle ground between Class::Mutator and true classless OOP, like Class::Classless.SYNOPSIS package Foo; use base qw(Class::Modular); use vars (@METHODS); BEGIN{@METHODS=qw(blah)}; sub blah{ my $self = shift; return 1; } package Bar; sub method_that_bar_provides{ print qq(Hello World! ); } sub _methods($$){ return qw(method_that_bar_provides); } use Foo; $foo = new Foo; $foo->load('Bar'); $foo->blah && $foo->method_that_bar_provides; Requirements: · Perl


Class::Modular Related Software