Created
December 18, 2012 07:41
-
-
Save cou929/4325883 to your computer and use it in GitHub Desktop.
同一ファイルで複数 namespace のテスト
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 | |
package TestPack; | |
use strict; | |
use warnings; | |
sub new { | |
my ($class) = @_; | |
return bless {}, $class; | |
} | |
sub sub_on_testpack { | |
my $self = shift; | |
'in the same file but other namespace' | |
} | |
1; | |
package main; | |
use strict; | |
use warnings; | |
print TestPack->new->sub_on_testpack() . "\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
実行結果