Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: cpan installing .3pm files?

by dsheroh (Prior)
on Jun 03, 2019 at 13:10 UTC ( #11100871=note: print w/replies, xml ) Need Help??


in reply to cpan installing .3pm files?

Even without knowing that .3pm indicates a man page, there's a pretty strong clue in that the full path of the file includes a .../man/... directory.

As for why your code couldn't find the file to (try to) use it, note that the filename is Search::Elasticsearch.3pm, but the error message indicates that Perl was trying to find a module named Search/Elasticsearch.pm - use converts :: to /, while the filename contains a literal ::, in addition to the extension being different.

Of course, if you really wanted to, you could pass the filename as a string (rather than a bareword) to require and get Perl to try to load it as a module that way, despite the literal colons and the extension... but it would still fail, because the file content is written in troff markup rather than Perl code and/or POD markup, so the result would be an ugly mess of syntax errors instead of working code:

~$ perl -E "require '/usr/local/share/man/man3/oo.3pm'" Bareword found where operator expected at /usr/local/share/man/man3/oo +.3pm line 2, near "*(C" (Missing operator before C?) String found where operator expected at /usr/local/share/man/man3/oo.3 +pm line 4, near ". ds C` "" (Missing semicolon on previous line?) String found where operator expected at /usr/local/share/man/man3/oo.3 +pm line 5, near ". ds C' "" (Missing semicolon on previous line?) String found where operator expected at /usr/local/share/man/man3/oo.3 +pm line 6, near ". ds L"" (Missing semicolon on previous line?) <...a few dozen more lines of the same omitted...> String found where operator expected at /usr/local/share/man/man3/oo.3 +pm line 22, at end of line (Missing semicolon on previous line?) Can't find string terminator '"' anywhere before EOF at /usr/local/sha +re/man/man3/oo.3pm line 22. Compilation failed in require at -e line 1.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11100871]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2020-05-24 23:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (142 votes). Check out past polls.

    Notices?