Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: gabiruh [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.15
Fixed in: 1.18



Subject: Weird behavior in lazy_build
# Weird behavior in lazy_build # perl v5.12.1 # Moose 1.15 package Foo; use Moose; has 'foo' => ( is => 'ro' ); has 'bar' => ( is => 'ro' ); has 'baz' => ( is => 'ro' ); has 'quux' => ( is => 'ro' , lazy_build => 1); package Bar; use Moose; extends 'Foo'; has '+foo' => ( lazy => 1, builder => '_build_foo' ); has '+bar' => ( default => 'whoa!' ); has '+baz' => ( lazy_build => 1 ); sub _build_foo { return 'bla'; } sub _build_baz { return 'woof!'; } sub _build_quux { return 'meow!'; } package main; use Test::More; my $bar = Bar->new; is( $bar->foo, 'bla' ); is( $bar->bar, 'whoa!' ); is( $bar->baz, 'woof!', 'weird...' ); # !? is( $bar->quux, 'meow!'); done_testing;