develooper Front page | perl.moose | Postings from January 2016

Annoying warning in Moose::Meta::Attribute; our $VERSION = '2.1604'

Thread Next
From:
shtil
Date:
January 18, 2016 18:26
Subject:
Annoying warning in Moose::Meta::Attribute; our $VERSION = '2.1604'
Message ID:
635407828.5368072.1453141554105.JavaMail.zimbra@comcast.net
Hi, 

I see the following when calling $self->meta->add_attribute in my code under perl 5.10.1: 

Use of uninitialized value in string eq at .../perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Meta/Attribute.pm line 1035. 

I think the following code segment: 



if ( 
$method 
&& !$method->is_stub 
&& !$method->isa('Class::MOP::Method::Accessor') 
&& ( !$self->definition_context 
|| $method->package_name eq $self->definition_context->{package} ) 
) { 




should look like: 




if ( 
$method 
&& !$method->is_stub 
&& !$method->isa('Class::MOP::Method::Accessor') 
&& ( !$self->definition_context 
|| exists(self->definition_context->{package}) && $method->package_name eq $self->definition_context->{package} ) 
) { 

-- 
Yuri 



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About