Skip to content

Instantly share code, notes, and snippets.

@kenjiskywalker
Created April 10, 2012 16:43
Show Gist options
  • Save kenjiskywalker/2352752 to your computer and use it in GitHub Desktop.
Save kenjiskywalker/2352752 to your computer and use it in GitHub Desktop.
use_base
#!/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