package shapes; #constructor sub new { my $invocant = shift; my $class = ref($invocant) || $invocant; my $self = { shape => {}, }; return bless $self, $class; } sub print_shape { my $self = shift; print $self->{shape}{line1} . "\n"; } 1