Created
October 26, 2012 17:50
-
-
Save rlb3/3960230 to your computer and use it in GitHub Desktop.
wait what?
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/perl -w | |
| use strict; | |
| use warnings; | |
| { | |
| package DEEP; | |
| sub deeply { "deeply inherited" } | |
| package UNIVERSAL; | |
| our @ISA = qw/DEEP/; | |
| package Foo; | |
| our @ISA = qw//; | |
| } | |
| print "Foo can do deeply\n" if Foo->can('deeply'); | |
| print "Foo isa UNIVERSAL\n" if Foo->isa('UNIVERSAL'); | |
| print "Foo is, strangely, not DEEP\n" unless Foo->isa('DEEP'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment