From: Shawn M Moore Date: Tue, 28 Apr 2009 08:09:38 +0000 (-0400) Subject: More tests X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=54b16ed8690d2ccdeb518e65fdee8e4c8f3f54bd;p=gitmo%2FPerl-Critic-Dynamic-Moose.git More tests --- diff --git a/t/DynamicMoose/ProhibitPublicBuilders.run b/t/DynamicMoose/ProhibitPublicBuilders.run index 4c584ff..dc83fe4 100644 --- a/t/DynamicMoose/ProhibitPublicBuilders.run +++ b/t/DynamicMoose/ProhibitPublicBuilders.run @@ -37,3 +37,32 @@ has attr => ( builder => 'build_attr', ); +#----------------------------------------------------------------------------- + +## name Public builder method, declared dynamically +## failures 1 +## cut + +package Class; +use Moose; + +__PACKAGE__->meta->add_attribute(attr => ( + is => 'rw', + builder => 'build_attr', +)); + +#----------------------------------------------------------------------------- + +## name Public builder method, named dynamically +## failures 1 +## cut + +package Class; +use Moose; + +my $builder = 'build_' . rand; +__PACKAGE__->meta->add_attribute(attr => ( + is => 'rw', + builder => $builder, +)); +