Skip Menu |
 

This queue is for tickets about the MooseX-Declare CPAN distribution.

Report information
The Basics
Id: 48439
Status: resolved
Priority: 0/
Queue: MooseX-Declare

People
Owner: Nobody in particular
Requestors: maik.hentsche [...] amd.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 0.22
  • 0.23
Fixed in: (no value)



Subject: Incomplete "use strict" error message
Failing to declare a variable with my or our results in an error since MooseX::Declare obviously includes "use strict" automatically. When such an undeclared occurs in a method that is not the last method of the class, only the following message is given: BEGIN not safe after errors--compilation aborted at lib/Bug/Little.pm line 10. Compilation failed in require. BEGIN failed--compilation aborted. It should rather be: Global symbol "$date" requires explicit package name at lib/Bug/ Little.pm line 6. BEGIN not safe after errors--compilation aborted at lib/Bug/Little.pm line 10. Compilation failed in require. BEGIN failed--compilation aborted. Obviously, the first line is missing. The example code below demonstrates the issue. If you leave out method mlittle3, it won't occur. use MooseX::Declare; class Bug::Little{ method mlittle2(){ $date='test'; return 'mlittle2'; } method mlittle3(){ return 'mlittle3'; } }
I'm unable to reproduce this with MX::Declare 0.24. Would you mind giving that a try as well?
From: maik.hentsche [...] amd.com
Download (untitled) / with headers
text/plain 232b
On Sat Aug 15 18:01:19 2009, FLORA wrote: Show quoted text
> I'm unable to reproduce this with MX::Declare 0.24. Would you mind > giving that a try as well?
cpan MooseX::Declare installed 0.26 which does not have the issue any more. Thanks a lot!
Issue does not occur in current version 0.26.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.