Hello,

  Wanting to capture the output of perldoc with a perl variable,
  I looked at perldoc.bat.  What perldoc.bat does is run the
  following script with the arguments given to perldoc:

    #!perl
    #line 15
        eval 'exec C:\opt\perl\bin\perl.exe -S $0 ${1+"$@"}'
            if 0;
    
    # This "perldoc" file was generated by "perldoc.PL"
    
    require 5;
    BEGIN { $^W = 1 if $ENV{'PERLDOCDEBUG'} }
    use Pod::Perldoc;
    exit( Pod::Perldoc->run() );

    __END__
    

  1) What does the following line do? 

    eval 'exec C:\opt\perl\bin\perl.exe -S $0 ${1+"$@"}'
        if 0;

    As far as I know, that line does nothing.

  2) The lines that get the required documentation are:

          use Pod::Perldoc;
          exit( Pod::Perldoc->run() );

     I guess Pod::Perldoc->run() figures out what the user
     wants to look up by examining argv/argc, correct? 

     Pod::Perldoc->run() returns success or failure, not the
     documentation.  The documentation just gets printed. 
     So I need to fool the code into printing to a variable.
     How would this be done?

  3) Any better way to look up documentation into a perl variable?

  Thanks,

  --Suresh 
    

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to