Deprecate Mouse->export and Mouse->export_to_level.
[gitmo/Mouse.git] / example / warns.pl
1 #!perl
2 package Point;
3 use Mouse;
4
5 # extra 'unknown_attr' is supplied (WARN)
6 has 'x' => (isa => 'Int', is => 'rw', required => 1, unknown_attr => 1);
7
8 # mandatory 'is' is not supplied (WARN)
9 has 'y' => (isa => 'Int', required => 1);
10
11 sub clear {
12   my $self = shift;
13   $self->x(0);
14   $self->y(0);
15 }
16
17 __PACKAGE__->meta->make_immutable(strict_constructor => 1);
18
19 package main;
20
21 # extra 'z' is supplied (FATAL)
22 my $point1 = Point->new(x => 5, y => 7, z => 9);