warn them to set the path?
try and set it myself like: `set path=($path /usr/local/bin)`; or `PATH=${PATH}:/usr/local/bin`;
Is their a standard for this type of thing when writing a module?
edit: sorry that I wasn't specific enough... On OSX when you install allegro the path to the conf file is at /usr/local/bin/allegro-config
When you try and install the perl allegro pm it can't find this file because it isn't in the path. I thought I might write a patch for it. That why I am interested in what is the best practice for this type of thing. So makefile.pl can suck the info it needs and I do it the right way.
$ENV{'PATH'} = q(/bin:/usr/bin:/usr/local/bin:/home/custom_stuff);
Note that you can only set the environment variables for your child processes and not for your parent process (unless you're on Win32).
So if you're running child processes (like a C compiler) from your Makefile.PL, the following will work:
use Config '%Config';
my $allegro_dir = '/usr/local/bin/';
$ENV{PATH} .= ":" . $allegro_dir;
...
The following won't do what you want though:
`PATH=$ENV{PATH}:$allegro_dir`;
because that will launch a child process, which sets the PATH environment variable and then ends. And the changes are gone with the end of the child too.
perlmonks.org content © perlmonks.org and arcnon, Corion, l3v3l, sh1tn
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03