-
-
Save sinkovsky/1932943 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Father; | |
$VERSION = "0.01"; | |
sub new { | |
my $self = {}; | |
bless $self; | |
return $self; | |
}; | |
sub _internal { | |
print "calling Father::_internal\n"; | |
}; | |
sub public { | |
shift->_internal(); | |
}; | |
1; | |
# ==================================== | |
package Child; | |
use base Father; | |
$VERSION = "0.01"; | |
sub new { | |
my $self = bless {}, shift; | |
$self->SUPER::new(@_); | |
return $self; | |
} | |
sub _internal { | |
print "calling Child::_internal\n"; | |
}; | |
# ============================= | |
$a = new Child; | |
$a->_internal(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment