This is a sub I use as part of a man.cgi app, an interface to look up perl docs.
use strict; use Pod::Simple::Search; use constant DEBUG => 0; for (qw(CGI.pm File::PathInfo HTML/Template.pm Smart::Comments)){ my $name = $_; my $returned = lookup_as_perl($name); print " ARG: $name = $returned\n"; } sub lookup_as_perl { my $arg_name = shift; print STDERR "lookup_as_perl() $arg_name, " if DEBUG; $arg_name=~s/^\/+//; # take out leading slashes $arg_name=~s/\/+/\:\:/g; $arg_name=~s/\.html$|\.pod$|\.pm$//; $arg_name=~s/\/+/\:\:/g; print STDERR "cleaned to $arg_name, " if DEBUG; #can we find this? my $search = Pod::Simple::Search->new; my $result = $search->find($arg_name); $result ||= 0; print STDERR "result = $result\n" if DEBUG; return $result; } # returns ... #[betti@mescaline cgihelp]# perl test.pl # ARG: CGI.pm = /usr/lib/perl5/5.8.8/CGI.pm # ARG: File::PathInfo = /usr/lib/perl5/site_perl/5.8.8/File/PathInfo.p +m # ARG: CGI::Carp = /usr/lib/perl5/5.8.8/CGI/Carp.pm # ARG: Smart::Comments = /usr/lib/perl5/site_perl/5.8.8/Smart/Comments +.pm # ARG: HTML/Template.pm = /usr/lib/perl5/site_perl/5.8.8/HTML/Template +.pm

In reply to Re: Module installed Path by leocharre
in thread Module installed Path by rose

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.