Created
April 10, 2012 16:43
-
-
Save kenjiskywalker/2352752 to your computer and use it in GitHub Desktop.
use_base
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
package Foo; | |
sub hoge{ return "hello" } | |
package Bar; | |
use base ( 'Foo' ); | |
sub new{ bless {}, 'Bar' } | |
package main; | |
my $bar = Bar->new; | |
print $bar->hoge; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment