From: Shawn M Moore Date: Fri, 27 Jun 2008 03:29:58 +0000 (+0000) Subject: POD and basic test for is_lazy_build X-Git-Tag: 0.19~274 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=93f088994c64a14d37d906a919c3d4e97b82f1ae;hp=bf6d766ddc05c71b6f4e679d8907f246d3ca4176;p=gitmo%2FMouse.git POD and basic test for is_lazy_build --- diff --git a/lib/Mouse/Meta/Attribute.pm b/lib/Mouse/Meta/Attribute.pm index ed14c49..4791dab 100644 --- a/lib/Mouse/Meta/Attribute.pm +++ b/lib/Mouse/Meta/Attribute.pm @@ -370,6 +370,8 @@ installed. Some error checking is done. =head2 has_builder -> Bool +=head2 is_lazy_build => Bool + =head2 should_auto_deref -> Bool Informational methods. diff --git a/t/101-meta-attribute.t b/t/101-meta-attribute.t index 6986fd4..cef1e3a 100644 --- a/t/101-meta-attribute.t +++ b/t/101-meta-attribute.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 10; do { package Class; @@ -28,5 +28,6 @@ is($attr->name, 'pawn', 'attribute name'); is($attr->class, 'Class', 'attached class'); is($attr->predicate, 'has_pawn', 'predicate'); is($attr->clearer, 'clear_pawn', 'clearer'); +ok(!$attr->is_lazy_build, "not lazy_build"); is(ref($attr->default), 'CODE', 'default is a coderef'); ok($attr->verify_type_constraint(1), 'verify_type_constraint works even without isa');