- or download this
package Parent;
...
sub new { bless {}, $_[0]; }
sub parent_version { $_[0]->SUPER::VERSION }
- or download this
print "Parent version is ", Parent->VERSION, "\n"; # 1.23
print "Child version is ", Child->VERSION, "\n"; # 5.43
- or download this
my $child = Child->new;
print "Child version: ", $child->VERSION, "\n"; # 5.43
print "Parent version: ", $child->parent_version, "\n"; # 1.23
- or download this
print "Child version: ", $child->child_version, "\n"; # 5.43
- or download this
print "Child version: ", $child->VERSION, "\n"; # 5.43
print "Child version: ", $child->child_version, "\n"; # 5.43