Class::InsideOut 1.01... with added sugar

dagolden on 2006-07-27T19:09:44

Class::InsideOut 1.01 just hit CPAN.

After seeing Damian's "Sufficiently Advanced Technologies" presentation, I decided to add some automation for common cases. register() now blesses for you and even provides an anonymous scalar reference. A basic constructor is as simple as this:

sub new { register shift }

Going one step further, an optional and very simple constructor is provided on request that automatically initializes properties from the arguments to new(). A minimal Class::InsideOut-based class is now as easy as this:

package My::Class;
use Class::InsideOut qw/ new id public private /;

public  name => my %name;
private age  => my %age;

1;