Some nits I need to pick with your code:
You have a syntax error. Change the ":" to a ";" and you have it made.Package main:
becomesmy $foo = HeckIfIKnow::new( -opt1 => '3456', -opt2 => '1234' );
my $foo = new HeckIfIKnow( -opt1 => '3456', -opt2 => '1234' );
which I don't think you were after. After fixing it my way you get:$VAR1 = bless( { '3456' => '-opt2', '1234' => undef }, '-opt1' );
which looks more like it.$VAR1 = bless( { '-opt2' => '1234', '-opt1' => '3456' }, 'HeckIfIKnow' );
| Peter L. Berghold -- Unix Professional Peter at Berghold dot Net | |
| Dog trainer, dog agility exhibitor, brewer of fine Belgian style ales. Happiness is a warm, tired, contented dog curled up at your side and a good Belgian ale in your chalice. | |
In reply to Re: Reducing Perl OO boilerplate
by blue_cowdawg
in thread Reducing Perl OO boilerplate
by flyingmoose
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |