Skip to content

Instantly share code, notes, and snippets.

@FROGGS
Created August 29, 2013 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FROGGS/ebdc0c7809d1b2902533 to your computer and use it in GitHub Desktop.
Save FROGGS/ebdc0c7809d1b2902533 to your computer and use it in GitHub Desktop.
$ mkdir foo && touch foo/bar.pl; perl6 -e 'say "foo/bar.pl".IO.e; chdir "foo"; require "bar.pl"'
True
Could not find file 'bar.pl' for module bar.pl
in any load_module at src/gen/ModuleLoader.nqp:200
in block at -e:1
@FROGGS
Copy link
Author

FROGGS commented Sep 3, 2013

<donaldh>
Fixing https://gist.github.com/FR​OGGS/ebdc0c7809d1b2902533 requires transforming @*INC 
to absolute paths before use.
It needs to be done in ModuleLoader.search_path. I don't know if it's possible to call 
IO::Spec.rel2abs from ModuleLoader, which is pre-setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment