in reply to modifying @INC other than use lib?

you can either set the environment variable PERL5LIB or edit your Config.pm

Replies are listed 'Best First'.
Re^2: modifying @INC other than use lib?
by merlyn (Sage) on Apr 18, 2005 at 12:46 UTC
    Never edit your Config.pm: that's meant to be a runtime reference to a number of settings that your Perl was compiled with.

    In particular, the initial value for @INC doesn't even come from there: it comes from a hardwired path compiled into the binary. Otherwise, how could Perl find the Config.pm file? Psychic powers?

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.

      Thanks Randal,

      I didn't get around to modifying it anyway before I hit on a lower tech solution:

      cd /sw/lib/perl5/5.8.1/darwin-thread-multi-2level/ sudo cp -R GD GD.pm /System/Library/Perl/5.8.1/darwin-thread-multi-2le +vel/ sudo cp -R auto/GD/ /System/Library/Perl/5.8.1/darwin-thread-multi-2l +evel/auto/
      I did try this before but failed to copy across the auto/ and it was complaining about not being able to find the loadable object.

      Also for the record I did also try this with symlinks and it didn't appear to work :/

      Dan

      Bukowski - aka Dan (dcs@black.hole-in-the.net)
      "Coffee for the mind, Pizza for the body, Sushi for the soul" -Userfriendly
      Otherwise, how could Perl find the Config.pm file? Psychic powers?

      I think there's a Perl6 RFC on that one. ;)

      Editing your Config.pm can be your only option sometimes; especially when relocating your Perl binary/library tree, and switching between using nmake or dmake in a Windows environment.
Re^2: modifying @INC other than use lib?
by Bukowski (Deacon) on Apr 18, 2005 at 12:43 UTC
    This is why I was wondering if there was something more MacOS X specific as the only "Config.pm" I can find on the system is the config for Fink.. not Perl...

    update:

    Scratch that - "find" finds what "finder" cannot on MacOS X - I am a Linux user at heart, this OS X stuff is still a bit alien to me :)

    Bukowski - aka Dan (dcs@black.hole-in-the.net)
    "Coffee for the mind, Pizza for the body, Sushi for the soul" -Userfriendly