bmckenzie has asked for the wisdom of the Perl Monks concerning the following question:

Hi There

So, this isn't about Perl but it is about Perl help, and the answer doesn't appear to be anywhere Google knows about.

The question is this: how do I get perldoc to work on the Mac with Textmate?

It works OK in the terminal window. Perldoc is in /opt/local/bin. So is Perltidy, which I got to work in Textmate by adding that location to Textmate's list of paths. But all I can get from perldoc is "perl version 5.12.3 can't run /usr/bin/perldoc." Bummer. Seems like if it can find perltidy, it should notice perldoc nearby :-) The bundle items that are supposed to show help on a a selected word (which rely on perldoc and pod2html) don't work, either.

thanks

Bruce

Replies are listed 'Best First'.
Re: perldoc from Textmate Perl bundle
by lutok (Scribe) on Feb 19, 2012 at 02:50 UTC

    I haven't used Textmate in a long time, and didn't use it for Perl even then, but there is a menu item "Perl" under the "Bundles" menu. If you have a perl script open, put the cursor over something such as "strict" and click on the Perl bundle item "Documentation for Word" and up will come the perldoc.

    I think its a default bundle, but if you don't have it use "GetBundles" to get it or look on Github. Hope that works.
    Good luck.

Re: perldoc from Textmate Perl bundle
by kcott (Archbishop) on Feb 20, 2012 at 06:11 UTC

    I haven't used Textmate so I can't give a definitive answer. However, noticing the path /opt/local/bin suggested to me that you might be using MacPorts. If so, take a look in the MacPorts Guide which has documentation relating to setting $PATH, $MANPATH and other environment variables. The section 2.6. MacPorts and the Shell is probably the most directly relevant.

    -- Ken

      Thank you.

      That was useful to read, although I didn't find anything there to help TextMate find perldoc.

      I managed to solve the TextMate problem by modifying all refs to the commands "perldoc" and "pod2html" in the TextMate Perl bundle to include the full path "/opt/local/bin/". But it still seems to me that if TextMate can find perltidy in that path, it should be able to find perldoc.

      Bruce