Category: | Utility Scripts |
Author/Contact Info | Clif Bratcher -> cebratcher at gmail dot com |
Description: | I've been having problems with some cpan installs. You know the deal. They install and test correctly, but something just doesn't work right. *cough* Needs more testing! *cough* So, in my haste to track down a few of these bugs, I wanted to know where the module(s) were stored. I threw together an extremely simple, but rather useful little script. (It was originally a one-liner, hence the anon sub and the speedy ternary conditional.) It's definately not fancy, but it does its job gracefully. IMO It's pretty self explanitory, but the jist is that it does a simple ignore-case regex over all dirs and subdirs in @INC. When it gets a hit, it spits it out. (Edited to clean up formatting!) |
#!/usr/bin/perl use strict; use warnings; use File::Find; if(my $m = shift){ find( sub{ /$m/i ? print"$File::Find::name\n" : 0 }, @INC); } else { print "Please enter a single search string as an argument!\n"; } |
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Module Finder
by blazar (Canon) on Oct 18, 2006 at 16:56 UTC | |
by Dietz (Curate) on Oct 19, 2006 at 06:21 UTC | |
by innominate (Beadle) on Oct 31, 2006 at 15:26 UTC | |
by Dietz (Curate) on Oct 31, 2006 at 16:42 UTC | |
by innominate (Beadle) on Oct 31, 2006 at 15:22 UTC |