Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: cpan installing .3pm files?

by dsheroh (Monsignor)
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/ - 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?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2020-10-20 08:38 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (209 votes). Check out past polls.