Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Grand::Parent;
- use strict;
- use warnings;
- sub new {
- my $class = shift;
- return { struct => $class->STRUCT };
- }
- # ---------------------------------
- package Grand::Parent::Child;
- use strict;
- use warnings;
- use base qw(Grand::Parent);
- sub STRUCT {
- { key => "value" }
- }
- # ---------------------------------
- package main;
- use strict;
- use warnings;
- my $child = Grand::Parent::Child->new();
- print $child->{struct}->{key};
Add Comment
Please, Sign In to add comment