Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

dagolden (6584)

dagolden
  (email not shown publicly)
AOL IM: xdaveg (Add Buddy, Send Message)

Journal of dagolden (6584)

Thursday July 27, 2006
02:09 PM

Class::InsideOut 1.01... with added sugar

[ #30446 ]

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;

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.