ActiveState Powered by ActiveState

ActiveState Community


perlapp executable doesn't produce pod2usage output

Posted by Tony Mancill on 2007-09-20 11:36

I have a Perl script that works fine with ActiveState Perl and with CPAN Perl on both Windows and Linux, but am now trying to generate a Windows executable using PerlApp in the PDK (trial license). When I run the script I am able to view the usage information produced by pod2usage(), but running the executable merely prints:

No documentation found for "scriptname.exe".

Pod::Usage is identified as a script dependency by PerlApp and I'm not modifying any of the defaults in PerlApp. Can anyone tell me if this this is a limitation of the trial version or maybe a bug?

Thank you,
Tony

alphapenguin | Tue, 2008-02-26 13:47

This is because the comments inside =pod and =cut are stripped out during the compile.

Instead, use this technique, which works for me:

1) Put the documentation in the __DATA__ section, like:

[...your script...]
__DATA__

=pod

=head1 NAME 
[...more POD...]

2) Then use the -input option to pod2usage, like this:

  pod2usage(-input => \*DATA)

(I realize this reply is very late, but I was looking for an answer myself and thought it might be useful to others.)

-->