Last active
August 29, 2015 13:56
-
-
Save three18ti/9206835 to your computer and use it in GitHub Desktop.
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
package Foo::Bar; | |
use strict; | |
use warnings; | |
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
package Foo::Baz; | |
use strict; | |
use warnings; | |
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
package Foo; | |
use strict; | |
use warnings; | |
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
#!/usr/bin/env perl | |
use 5.010; | |
use strict; | |
use warnings; | |
# note, gists don't support subdirectories, so you will need to run the following commands | |
# once you have checked out your gist and cd'd to it | |
# mkdir -p lib/Foo | |
# mv Foo.pm lib/ | |
# mv {Bar,Baz}.pm lib/Foo/ | |
BEGIN { | |
say "Note the error message (can't find Foo::Bar, that's the Foo.pm package.)"; | |
eval { | |
require 'lib/Foo.pm'; | |
}; | |
say $@; | |
} | |
say "Note this loads without issue"; | |
use lib 'lib'; | |
use Foo; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment