Menu

Eclipse Epic Perl Mac Perldoc not available.

Help
Woolwit
2011-07-09
2013-05-20
  • Woolwit

    Woolwit - 2011-07-09

    When I try to access the Perldoc info from within Eclipse I get a "Documentation not available" message. Can someone tell me the name of the Perldoc file and where it should be? Or suggest a way to resolve this? I've looked around a lot and any clues I've run across relate to Windows or Linux boxes. Thank You.

     
  • Jan Ploski

    Jan Ploski - 2011-07-09

    The canonical test is to highlight a "print" statement in source code and then try to view Perldoc. The following snippet of Perl code is what EPIC executes in response, using the Perl interpreter configured in Preferences, and also using the set of environment variables inherited from the Eclipse process (I suspect that this, including PATH, might differ from your experiments on the command line):

    use Env qw(@PERL5LIB);
    splice(@PERL5LIB, 0, 0, @INC);
    exec('perldoc -t -f "print"');
    

    The expected result looks like so:

        print FILEHANDLE LIST
        print LIST
        print   Prints a string or a list of strings. Returns true if
                successful. FILEHANDLE may be a scalar variable containing the
                name of or a reference to the filehandle, thus introducing one
                level of indirection. (NOTE: If FILEHANDLE is a variable and the
    ...
    
     
  • Woolwit

    Woolwit - 2011-07-10

    Well, you lost me there.
    Probably this isn't a forum for someone as Newb as myself.
    I installed Eclipse and Epic as per a tutorial video I'm watching and it's just frustrating to see him refer to the Perldoc from within Eclipse because I get the error message. Everything else seems to be running fine.
    Thanks for your time.

     
  • Jan Ploski

    Jan Ploski - 2011-07-10

    The idea is for you to run the first snippet of code in command line (shell) to see whether it works. If it doesn't, disregard EPIC for a moment and find out why. If it does, then there must be some difference in how you run it and how EPIC runs it from within Eclipse. The difference most likely exists in the set and values of "environment variables" that your shell uses, in comparison to the set and values of environment variables used by EPIC. For comparison, you can print out both sets of environment variables using a Perl script (run it from shell, then run it from EPIC/Eclipse):

    use Data::Dumper;
    print Dumper(\%ENV);
    

    Assuming they are different, you could adjust the environment variables for Eclipse to match those of the shell. The environment variables PERL5LIB and PATH seem like the best candidates for such adjustment.

    The topic of "how to set an environment variable for a process" is not Perl-related and is specific to an operating system. However, it is useful to realize that generally environment variables are inherited across the process hierarchy (so when you run Eclipse from shell, the Eclipse process should get the same variables as the shell, when you run it via icon from desktop, it will get the same variables as the desktop manager process or some such).

     
  • Woolwit

    Woolwit - 2011-07-11

    From the Command line I can call the perldoc at the prompt. When you say 'run the first snippet of code in the command line' I understand that to mean: Run a Perl script with that snippet from the Command Line. When I do, I get: "No documentation found for "perlfunc"." When I run the same snippet in Eclipse, I get: "Use of uninitialized value in split at /System/Library/Perl/5.8.8/Env.pm line 200.
    No documentation found for "perlfunc"."
    I see perldoc sitting there right beside perl5.8.8 in usr/bin
    I don't know how to get the path to the perldoc (that does works) from the Command line.
    If I had that I could compare it to the path I see in Eclipse when I run the  use Data::Dumper; snippet.
    You've already been very generous with your time and I think I'm just in over my head, plus I can always get the perldoc online, I'm going to jump back into some more tutorials. Thank You.

     

Log in to post a comment.