in reply to Modifying %ENV From The Shebang Line

Have you tried (would it be suitable to use) the -I/lib/path option on the perl script's shebang line?
#!/usr/bin/perl -I/path/containing/my_modules use My::Module; # should load /path/containing/my_modules/My/Module. +pm
This has always worked for me...

UPDATE: Sorry, I see that I have misunderstood the question. Having checked the man page for "env", I would have expected the use of LD_LIBRARY_PATH=/some/path to work. Then again, I'm looking at a freebsd man page for this utility, and it looks like its behavior may differ according to your OS (in particular, "env"s behavior changed between freebsd 5.6 and 6.0, for example...) Maybe you need to use "/usr/bin/env -S ..." to get things to work as expected? (Maybe the "-S" option is peculiar to freebsd? I don't know.)

Replies are listed 'Best First'.
Re^2: Modifying %ENV From The Shebang Line
by williams (Beadle) on Dec 17, 2007 at 23:43 UTC
    Subversion starts the hook script, and forces a particular command line syntax that doesn't include Perl's -I. However, I could use the lib pragma to get the same effect, and I am doing that. Somehow, though, it's not enough. I need $LD_LIBRARY_PATH also set before Perl starts or I get either an unresolved reference or a core dump from within the Subversion API.

    Thanks,

    Jim