I've run into a problem with a module I'm writing for CPAN. Using Extutils::makeMaker, I have it install into /path/to/perl/modules/Foo.pm . It has some plugins which go into /path/to/perl/modules/Foo/Bar.pm, /path/to/perl/modules/Foo/blurp.pm etc.
Now the problem is how to avoid hardcoding /path/to/perl/module/Foo into Foo.pm? I discovered PM_FILTER and changed Foo.pm to say INST_LIBDIR/Foo and made a filter like this in Makefile.PL:
The problem is this changes to blib/lib/Foo .'PM_FILTER' => 'perl -pe \"s|INST_LIBDIR|$(INST_LIBDIR)|g;\"'
Now I have
which is more like what I want but obviously won't work if the user does a site, or private install.'PM_FILTER' => 'perl -pe \"s|INST_LIBDIR|$(INSTALLVENDORLIB)|g;\"'
So what should I do to solve this problem?
--
જલધર
In reply to How to make a module aware of where it is installed? by jaldhar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |