Skip to content

Instantly share code, notes, and snippets.

@sinkovsky
Forked from anonymous/test.pl
Created February 28, 2012 14:53
Show Gist options
  • Save sinkovsky/1932943 to your computer and use it in GitHub Desktop.
Save sinkovsky/1932943 to your computer and use it in GitHub Desktop.
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