Created
April 5, 2020 15:42
-
-
Save jjn1056/5cb238b3295994085cf62a3b00022e12 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
my @test; | |
sub test { | |
my ($class, $arg) = @_; | |
my $varname = "${class}::test"; | |
no strict "refs"; | |
push @$varname, $arg if defined($arg); | |
return @$varname, | |
map { $_->test } | |
grep { $_->can('test') } | |
$class->ancestors; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment