MRP::BaseClass

Base class object
Download

MRP::BaseClass Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Matthew Pocock
  • Publisher web site:
  • http://search.cpan.org/~mpocock/

MRP::BaseClass Tags


MRP::BaseClass Description

Base class object MRP::BaseClass is a base class for Perl objects that generates the class interface from a definition.SYNOPSISThe aim of this package is to allow you to define a classes interface, and have perl generate all of the standard functions for you. Currently, you can define:fieldsMember access functions are auto-generated so that nowhere in your code do you ever directly access member variables.package variablesClass functions are auto-generated to make package variables work like static class members.default variablesThe package variable an be made to act as the default value for a field of the same name.delegation supportSimply specify which field is a delegate and which funcitons to delegate to it, and the glue code is auto-generated.The other realy usefull thing it does is provide dramaticaly better error messages when methods or static functions canot be found. Try invoking the < C -w > flag. It even lists possible correct spellings of misspelled function names!As a matter of course, I include the class definition in a BEGIN block at the end of the package. This allows the interface to be checked, and the code to be generated at compile time. This has the additional benefit that these checks are performed during a < C -c > compilation. Requirements: · Perl


MRP::BaseClass Related Software