On 12/3/2003 11:26 PM, [EMAIL PROTECTED] wrote:
I've looked through my O'Reilly bookshelf, google'd, RTFM's, and I haven't found the *right* way to do this, and I'm not even sure this is the right place to be asking this. Anyway...
I have a perl module that needs to have access to a group of .png files that ship with it. So, I made an /images directory under MyModuleName/ directory, and put them in there, and they get installed in the perl lib directory just fine. Now, my module needs to be able to find those, and use them, and I don't know what the right way to do that is.
I've found a way to do it, but it seems like an ugly kludge to me. I put the text "----SRC_IMAGES----" in my perl module where I needed to know the directory the images where in, and added a PM_FILTER to the Makefile.PL like this: 'PM_FILTER' => 'perl -pe "s!----SRC_IMAGES----!$(INSTALLSITELIB)/$(FULLEXT)!g"'
The module has a way to override this default directory, so my tests just override the default directory with "MyModuleName/images" so that it uses the images from the distribution directory during testing.
This will work as long as the module get's installed into the $(INSTALLSITELIB) directory (which even works when you specify PREFIX=/some/dir). But I can't imagine that this is the right way to do something like this. I'm also concerned that it could get installed somewhere else on some perl installations, but I don't know.
For those interested, the module is Authen::Captcha.
Any ideas? -- Josh I.
--
A little learning is a dang'rous thing;
Drink deep, or taste not the Pierian spring;
There shallow draughts intoxicate the brain;
And drinking largely sobers us again.
- Alexander Pope