M
Mark Seger
I'm trying to use Compress::Zlib in a script I'm trying to run on a
number of platforms. Depending on which version of Compress and perl
are being used, more often than not it seems Zlib gets installed in a
direction not in the current @INC - the most common being ending up in a
5.6 directory on a 5.8 system or visa-versa and it's driving me and the
users of the script crazy.
The thought I had was in the initialization section to look in specific
known locations to figure out where Zlib ended up and then add that
location to @INC. right? I thought I'd try to be clever and use the
lib module to set INC but to do that at run vs compile time I have to do
it in a require. No problem, or so I thought, but if I can't figure out
the syntax! My thought was since the syntax for 'use' is
use lib 'path';
I could say
require "lib 'path'";
but that doesn't seem to do it. So I guess my multipart question is:
- is this a reasonable way to deal with rpms that install into multiple
locations?
- is the correct way to set my path dynamically to 'require lib' and if
so what is the correct syntax?
- is there a way to get an rpm to install in a directory I want it to
rather than the ones it wants to?
-mark
number of platforms. Depending on which version of Compress and perl
are being used, more often than not it seems Zlib gets installed in a
direction not in the current @INC - the most common being ending up in a
5.6 directory on a 5.8 system or visa-versa and it's driving me and the
users of the script crazy.
The thought I had was in the initialization section to look in specific
known locations to figure out where Zlib ended up and then add that
location to @INC. right? I thought I'd try to be clever and use the
lib module to set INC but to do that at run vs compile time I have to do
it in a require. No problem, or so I thought, but if I can't figure out
the syntax! My thought was since the syntax for 'use' is
use lib 'path';
I could say
require "lib 'path'";
but that doesn't seem to do it. So I guess my multipart question is:
- is this a reasonable way to deal with rpms that install into multiple
locations?
- is the correct way to set my path dynamically to 'require lib' and if
so what is the correct syntax?
- is there a way to get an rpm to install in a directory I want it to
rather than the ones it wants to?
-mark