projects
/
gitmo/MooseX-ClassAttribute.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Tidy all code
[gitmo/MooseX-ClassAttribute.git]
/
t
/
05-with-attribute-helpers-backcompat.t
1
use strict;
2
use warnings;
3
4
use Test::More;
5
6
use Test::Requires {
7
'MooseX::AttributeHelpers' => 0.23,
8
};
9
10
{
11
package MyClass;
12
13
use Moose;
14
use MooseX::ClassAttribute;
15
use MooseX::AttributeHelpers;
16
17
class_has counter => (
18
metaclass => 'Counter',
19
is => 'ro',
20
provides => {
21
inc => 'inc_counter',
22
},
23
);
24
}
25
26
is( MyClass->counter(), 0 );
27
28
MyClass->inc_counter();
29
is( MyClass->counter(), 1 );
30
31
done_testing();