in reply to Find the file for a module

I've been using the following script, placed at ~/bin/whichpm.
#!/usr/bin/perl use File::Spec::Functions qw(:ALL); $ARGV[0] or die "usage: $0 Module::Name\n"; my $subpath = catfile(split '::', $ARGV[0]).".pm"; for(@INC) { my $fullpath = catfile($_, $subpath); print("$fullpath\n"), exit if -f $fullpath; } die +(splitdir $0)[-1] . ": no such module $subpath\n";

Makeshifts last the longest.