Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates > by-pkgid > 1a3629464b9b5ca6d71831aa6f1473b2 > files > 57

perl-Mouse-0.58-1.fc13.i686.rpm

#!perl
package Point;
use Mouse;

# extra 'unknown_attr' is supplied (WARN)
has 'x' => (isa => 'Int', is => 'rw', required => 1, unknown_attr => 1);

# mandatory 'is' is not supplied (WARN)
has 'y' => (isa => 'Int', required => 1);

sub clear {
  my $self = shift;
  $self->x(0);
  $self->y(0);
}

__PACKAGE__->meta->make_immutable(strict_constructor => 1);

package main;

# extra 'z' is supplied (FATAL)
my $point1 = Point->new(x => 5, y => 7, z => 9);