Re: OO constructors

2009-03-12 Thread Dr.Ruud
Dermot wrote: Dr.Ruud: Dermot: my $instance = new MyClass; my $instance = MyClass-new; MyClass::-new MyClass::-new() So do they all amount to the same thing? Fundamentally not. In many practical situations they behave about the same. Until they don't. The last one is the most

Re: OO constructors

2009-03-11 Thread Dr.Ruud
Dermot wrote: I created a small Class, initially with Moose. When I wanted an instance of the class I would call `my $instance = new MyClass`; I then removed Moose and went for a standard Perl 00 constructor: sub new { my $class = shift; my $self = {}; $self-{config} = _get_config();

Re: OO constructors

2009-03-11 Thread Dermot
2009/3/11 Dr.Ruud rvtol+use...@isolution.nl: Dermot wrote: I created  a small Class, initially with Moose. When I wanted an instance of the class I would call `my $instance = new MyClass`; I then removed Moose  and went for a standard Perl 00 constructor: sub new {  my $class = shift;  

Re: OO constructors

2009-03-11 Thread Jim Gibson
On 3/11/09 Wed Mar 11, 2009 5:28 AM, Dermot paik...@googlemail.com scribbled: 2009/3/11 Dr.Ruud rvtol+use...@isolution.nl: Dermot wrote: I created  a small Class, initially with Moose. When I wanted an instance of the class I would call `my $instance = new MyClass`; I then removed

Re: OO constructors

2009-03-11 Thread Dermot
2009/3/11 Jim Gibson jimsgib...@gmail.com: On 3/11/09 Wed  Mar 11, 2009  5:28 AM, Dermot paik...@googlemail.com scribbled: 2009/3/11 Dr.Ruud rvtol+use...@isolution.nl: Dermot wrote: I created  a small Class, initially with Moose. When I wanted an instance of the class I would call `my