From: Guillermo Roditi Date: Fri, 26 Oct 2007 20:40:31 +0000 (+0000) Subject: if to elsif X-Git-Tag: 0_44~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d2533c523004407143d672977f59e53f83ca842a;p=gitmo%2FClass-MOP.git if to elsif --- diff --git a/lib/Class/MOP/Attribute.pm b/lib/Class/MOP/Attribute.pm index 90f7d57..c2cfdf1 100644 --- a/lib/Class/MOP/Attribute.pm +++ b/lib/Class/MOP/Attribute.pm @@ -91,8 +91,7 @@ sub initialize_instance_slot { # attribute's default value (if it has one) if (!defined $val && defined $self->{'$!default'}) { $val = $self->default($instance); - } - if (!defined $val && defined $self->{'$!builder'}) { + } elsif (!defined $val && defined $self->{'$!builder'}) { my $builder = $self->{'$!builder'}; confess(blessed($instance)." does not support builder method '$builder' for attribute '" . $self->name . "'") unless $instance->can($builder);