in reply to Re4: Constructor/Factory Orthodoxy
in thread Constructor/Factory Orthodoxy
And, yes, you should say (ref $foo)->new(); or, better, my $classname = ref $foo; $classname->new();. (Though, I don't know why you'd ever want to do that. Anytime I've ever seen that, I always saw a restructuring that would improve the code and remove that construct.)
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Constructor/Factory Orthodoxy
by Abigail-II (Bishop) on Feb 26, 2003 at 22:31 UTC | |
by dragonchild (Archbishop) on Feb 27, 2003 at 14:14 UTC | |
Re: Re5: Constructor/Factory Orthodoxy
by steves (Curate) on Feb 27, 2003 at 05:56 UTC | |
by dragonchild (Archbishop) on Feb 27, 2003 at 14:21 UTC | |
by Abigail-II (Bishop) on Feb 27, 2003 at 14:40 UTC |