|Don't ask to ask, just ask|
Perl6, modifying @*INCby molecules (Monk)
|on Aug 05, 2010 at 14:36 UTC||Need Help??|
molecules has asked for the
wisdom of the Perl Monks concerning the following question:
I was going to try to help flamey with his LWP::Simple problem. However, I had a different problem. I need to modify my @*INC, but have not been successful with it. Here are a couple of my attempts:
This gives the following error:
I also tried:
Which gives the following error:
I am using Rakudo Star, installed on Windows using the MSI installer.
On my Linux installation trying to use the BEGIN block also gives an error. However, LWP::Simple is already in one of the @*INC paths.
Just a note that it is actually more intuitive to use unshift instead of push when modifying @*INC. This puts your added path at the beginning of @*INC, where it will be given precedence over "default" paths.