-
-
Save ktat/5e54ae2a9118e05651b1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 feature 'say'; | |
package Hoge{ | |
sub new { | |
my $class = shift; | |
my $args = ref $_[0] ? $_[0] : +{@_}; | |
bless $args, $class; | |
} | |
sub say_package{ | |
my $self = shift; | |
ref $self || $self; | |
} | |
} | |
package Fuga{ | |
use base qw/Hoge/; | |
} | |
package main; | |
use strict; | |
say Fuga->say_package(); | |
say Fuga->new->say_package(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment