updating the test numbers and adding the CountingClass test
[gitmo/Class-MOP.git] / t / lib / CountingClass.pm
CommitLineData
1a7ebbb3 1
2package CountingClass;
3
4use strict;
5use warnings;
6
7use Class::MOP 'meta';
8
9our $VERSION = '0.01';
10
11__PACKAGE__->meta->superclasses('Class::MOP::Class');
12
13__PACKAGE__->meta->add_attribute(
14 Class::MOP::Attribute->new('$:count' => (
15 reader => 'get_count',
16 default => 0
17 ))
18);
19
20sub construct_instance {
21 my ($class, %params) = @_;
22 $class->{'$:count'}++;
23 return $class->SUPER::construct_instance();
24}
25
261;