Created
January 4, 2012 11:06
-
-
Save ruz/1559592 to your computer and use it in GitHub Desktop.
Reproducible case for https://github.com/schwern/method-signatures/issues/41
This file contains 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
use strict; | |
use warnings; | |
package Bar; | |
use MyBase; | |
1; |
This file contains 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
use strict; | |
use warnings; | |
package Foo; | |
use MyBase 'Bar'; | |
1; |
This file contains 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
use strict; | |
use warnings; | |
package MyBase; | |
require Method::Signatures; | |
sub import { | |
my ($class, $base) = (@_); | |
Method::Signatures->import( { into => scalar caller } ); | |
return unless $base; | |
my $file = $base; | |
$file =~ s/::|'/\//g; | |
$file .='.pm'; | |
require $file; | |
} | |
1; |
This file contains 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
use lib '.'; | |
use Foo; | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment