Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 57510
Status: resolved
Priority: 0/
Queue: Moose

People
Owner: Nobody in particular
Requestors: schwiege [...] gmx.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.18



Subject: lazy_build - missing warning
Date: Sat, 15 May 2010 16:31:27 +0200
To: bug-Moose [...] rt.cpan.org
From: schwiege <schwiege [...] gmx.net>
test case follows ( and is attached as file ). This should give a warning, but does not. Thank you! ---- use strict; use warnings; use Test::More; use Test::Warn; { package Bar; use Moose; use MooseX::Types::Moose qw/:all/; has has_attr => ( is => 'ro', isa => Str, ); ::warning_like { has attr => ( is => 'ro', isa => Str, lazy_build => 1, # Causes the has_attr method to be overwritten ); } qr/.*/; sub _build_attr {} } done_testing;
use strict; use warnings; use Test::More; use Test::Warn; { package Bar; use Moose; use MooseX::Types::Moose qw/:all/; has has_attr => ( is => 'ro', isa => Str, ); ::warning_like { has attr => ( is => 'ro', isa => Str, lazy_build => 1, # Causes the has_attr method to be overwritten ); } qr/.*/; sub _build_attr {} } done_testing;
Note that this actually has nothing to do with lazy_build.