in reply to Reducing Perl OO boilerplate
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. |
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Reducing Perl OO boilerplate
by exussum0 (Vicar) on Feb 18, 2004 at 03:24 UTC | |
by Trimbach (Curate) on Feb 18, 2004 at 04:02 UTC | |
by exussum0 (Vicar) on Feb 18, 2004 at 12:31 UTC | |
by flyingmoose (Priest) on Feb 18, 2004 at 14:55 UTC | |
by Trimbach (Curate) on Feb 18, 2004 at 16:45 UTC | |
by flyingmoose (Priest) on Feb 18, 2004 at 17:02 UTC |