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 mo
2009/3/11 Jim Gibson :
> On 3/11/09 Wed Mar 11, 2009 5:28 AM, "Dermot"
> scribbled:
>
>> 2009/3/11 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
On 3/11/09 Wed Mar 11, 2009 5:28 AM, "Dermot"
scribbled:
> 2009/3/11 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 Pe
2009/3/11 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
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();