Guest User

Untitled

a guest
Jan 19th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.45 KB | None | 0 0
  1. package Grand::Parent;
  2. use strict;
  3. use warnings;
  4.  
  5. sub new {
  6.     my $class = shift;    
  7.     return { struct => $class->STRUCT };
  8. }
  9. # ---------------------------------
  10. package Grand::Parent::Child;
  11. use strict;
  12. use warnings;
  13. use base qw(Grand::Parent);
  14.  
  15. sub STRUCT {
  16.     { key => "value" }
  17. }
  18. # ---------------------------------
  19. package main;
  20. use strict;
  21. use warnings;
  22.  
  23. my $child = Grand::Parent::Child->new();
  24. print $child->{struct}->{key};
Add Comment
Please, Sign In to add comment