![]() |
|
good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^2: Find installed Perl modules matching a regular expressionby toolic (Bishop) |
on Sep 16, 2009 at 14:11 UTC ( #795621=note: print w/replies, xml ) | Need Help?? |
I appreciate the feedback ++
To get rid of the unix limitation you could die without $ENV{HOME}, or use File::HomeDir.You are correct: the reason for my self-imposed unix limitation is that I was unaware of how to handle $ENV{HOME} in a portable way. Thanks for bringing the File::HomeDir module to my attention. For my purposes, I have come to realize that it is important to only use core modules in this script. The original version of the script used the non-core List::MoreUtils. I ran into problems on one system configuration here @work which, unbelievably, did not have it installed. So I could not even analyze what modules were installed because my script died because it could not use a module! I will take a look at the File::HomeDir source code to see if I can incorporate its techniques for making findpm portable. Whoops, I just realized pminst is broken in 2 waysI am also aware of 2 bugs in pminst:
I should file a bug report on CPAN. Unfortunately, it is not obvious to me how to patch the code. I guess this is the reason I created the findpm script in the first place. Update: Someone has reported a bug: https://rt.cpan.org/Public/Bug/Display.html?id=50644
In Section
Cool Uses for Perl
|
|