in reply to Re: Using Perl subroutines in a Perl2Exe exe file
in thread Using Perl subroutines in a Perl2Exe exe file

Wow, thanks very much for this reply! Much to chew on.

First, I ran Perl2Exe on my code, and then fired up Wordpad to look at the file. Happily, I didn't see anything that looked like Perl source code. And, when I searched for the one text string that I want to protect, I didn't find it. So, while this is probably not encrypted in the classic sense, it seems sufficiently obscured that it meets my need.

I like your idea of writing a 'glue' script that would provide a CLI interface. I can see how to pass paramters into this (just by putting them on the command line following the name of the glue script .exe file). But how can I receive multiple return values back (or can I)?

Thanks
tl

  • Comment on Re^2: Using Perl subroutines in a Perl2Exe exe file

Replies are listed 'Best First'.
Re^3: Using Perl subroutines in a Perl2Exe exe file
by waswas-fng (Curate) on Jun 29, 2005 at 20:27 UTC
    Aww shucks, that adds at least 30 seconds to the time it takes to look at your plaintext perl script... Look here


    -Waswas
Re^3: Using Perl subroutines in a Perl2Exe exe file
by Xaositect (Friar) on Jun 30, 2005 at 18:00 UTC

    Well, you can only get the exe's return value if you are expecting a single integer back from the call.

    my $returncode = system('bar.exe some params');
    I think there are some rather harsh range limitations on the return code as well. That's probably not going to be good enough, so you're probably going to have to develop a common interface of some kind. The easiest would be to simply print to stdout, but it could be anything, like creating a file, or inserting into a database, or whatever.
    my $stdout = qx("bar.exe some arguments");
    Watch out for the fact that command-line arguments are processed differently depending on how many arguments you pass to the system or qx call.


    Xaositect - Whitepages.com