package P1;

use strict;
use warnings;
use Types::Standard 'Int';

use slot -debug;
use slot x => Int, rw => 1, def => 0;
use slot y => Int, rw => 1, req => 1;

1;

package P2;

use strict;
use warnings;
use Types::Standard 'Int';

use parent -norequire, 'P1';

use slot -debug;
use slot z => Int, rw => 1, def => 0;

1;

package main;
use Data::Dumper;

my $p = P2->new(x => 10, y => 30, z => 10);
print Dumper($p);
