diff options
| author | franck cuny <franck@lumberjaph.net> | 2010-06-19 15:08:51 +0200 |
|---|---|---|
| committer | franck cuny <franck@lumberjaph.net> | 2010-06-19 15:08:51 +0200 |
| commit | f9de2becaaca0b01dfb98334be00f27b8cbf05f4 (patch) | |
| tree | 384312da06c404c842d0d696498d141c3263c32f /t/15_protected_attribute.t | |
| parent | use new role to generate method (diff) | |
| download | moosex-privacy-f9de2becaaca0b01dfb98334be00f27b8cbf05f4.tar.gz | |
some tidy
Diffstat (limited to 't/15_protected_attribute.t')
| -rw-r--r-- | t/15_protected_attribute.t | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/t/15_protected_attribute.t b/t/15_protected_attribute.t index fe3fd9a..36e8f66 100644 --- a/t/15_protected_attribute.t +++ b/t/15_protected_attribute.t @@ -5,28 +5,24 @@ use Test::More tests => 10; use Test::Exception; use Test::Moose; -{ - - package Foo; - use Moose; - use MooseX::Privacy; - - has foo => ( - is => 'rw', - isa => 'Str', - traits => [qw/Protected/], - default => 'foo' - ); -} +package Foo; +use Moose; +use MooseX::Privacy; -{ +has foo => ( + is => 'rw', + isa => 'Str', + traits => [qw/Protected/], + default => 'foo' +); - package Bar; - use Moose; - extends 'Foo'; +package Bar; +use Moose; +extends 'Foo'; - sub bar { (shift)->foo } -} +sub bar { (shift)->foo } + +package main; with_immutable { ok my $foo = Foo->new(); |
