Skip Menu |
 

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

Report information
The Basics
Id: 76054
Status: new
Priority: 0/
Queue: MooseX-LazyRequire

People
Owner: Nobody in particular
Requestors: ilyuha1 [...] mail.ru
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.07
Fixed in: (no value)

Attachments


Subject: 'lazy_required' doesn't work on inherited attributes
MooseX::LazyRequire doesn't work for inherited attributes, test is in attached file.
Subject: moosex-lazyrequire-inheritance.t
#!/usr/bin/env perl use strict; use warnings; use Test::Exception tests => 1; { package Account; use Moose; use MooseX::LazyRequire; has 'password' => ( is => 'rw', isa => 'Str', ); package AccountExt; use Moose; extends 'Account'; use MooseX::LazyRequire; use Carp; has '+password' => ( is => 'ro', # Probably there also should be: # traits => ['LazyRequire'], # but I'm not sure lazy_required => 1, ); } my $r = AccountExt->new; throws_ok( sub { print $r->password }, qr/Attribute password must be provided before calling reader/, 'works on inherited attributes' );


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.