I know an exe is binary - I'm not sure what you are suggesting. I am using pod::usage to output text messages from my script when needed, like a help and man screen. When running the EXE, it should work the same as running the script e.g.,
script.pl -h -> print help text
script.exe -h -> print help text
Shouldn't this behave the same? Thanks
| [reply] [d/l] [select] |
Pod::Usage works by reading the (Perl) source code of your main program. Ideally, Pod::Usage would know about how you packed your Perl program into an .exe format file, but it doesn't, so it can't extract the source code of your main program to create the help text. This is why it won't work without you doing some work.
| [reply] [d/l] |
I'm not sure what you are suggesting.
I showed you one solution, based on PAR. perl2exe has similar caveats, and a similar solution (give pod2usage a text file with pod to read)
When running the EXE, it should work the same as running the script e.g.,.... Shouldn't this behave the same? Thanks
No. pod2usage reads $0 (a text file, a perl program) unless you tell it different. With perl2exe $0 is the binary file .exe, so you need to tell pod2usage to read a text file, not the .exe
| [reply] |
| [reply] |