Created
July 17, 2010 11:30
-
-
Save monken/479448 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Foo; | |
use Moose; | |
use Test::More; | |
has foo => ( is => 'rw', lazy => 1, predicate => 'has_foo', default => 1 ); | |
my $foo = new Foo; | |
ok($foo->has_foo); # fail | |
ok($foo->meta->get_attribute('foo')->has_value($foo)); # fail | |
ok($foo->foo); # ok | |
ok($foo->has_foo); # ok |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment