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 if you don't give it one. 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;
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
In reply to Class::InsideOut 1.01 now with added sugar by xdg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |