Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Mouse CPAN distribution.

Report information
The Basics
Id: 50422
Status: resolved
Priority: 0/
Queue: Mouse

Owner: Nobody in particular
Requestors: mschwern [...]

Bug Information
Severity: Important
Broken in: 0.37
Fixed in: (no value)

Subject: Calling new() in a BEGIN block on a class with a BUILD method caused a warning.
Download (untitled) / with headers
text/plain 722b
{ package Bar; use Mouse; sub BUILD {} } BEGIN { Bar->new; } This results in 'Name "Mouse::Object::BUILD" used only once: possible typo at lib/Mouse/ line 54.'. Adding "no warnings 'once';" to the do block is one way to handle it. Its broken in both 0.37 and master. --- a/lib/Mouse/ +++ b/lib/Mouse/ @@ -51,7 +51,7 @@ sub BUILDALL { return unless $self->can('BUILD'); for my $class (reverse $self->meta->linearized_isa) { - my $build = do{ no strict 'refs'; *{ $class . '::BUILD' }{CODE} } + my $build = do{ no strict 'refs'; no warnings 'once'; *{ $class . '::BUILD' }{CODE} } or next; $self->$build(@_);
Download (untitled) / with headers
text/plain 121b
Hello, Michael. Thanks. As I fix RT #50421, this issue is also resolved. Regards, -- Goro Fuji (gfx) GFUJI at

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

Please report any issues with to