in reply to Re: Optimise Perl code pl file
in thread Optimise Perl code pl file

Is Devel::PreProcessor used when compiling Perl to bytecode? I was considering doing that in the future to enable people without Perl to install my scripts, and to obfuscate it, but the following was among the limitations listed for Devel::PreProcessor
While some pragmas are known to work, including use vars, problems may pop up with others. In particular, use strict and no strict pragmas are removed from the resulting source, because their scoping changes in a single-file context, usually with fatal results.
That sounds like a major limitation to me.

Replies are listed 'Best First'.
Re: Re: Re: Optimise Perl code pl file
by simonm (Vicar) on Nov 29, 2003 at 01:38 UTC
    Is Devel::PreProcessor used when compiling Perl to bytecode?

    Nope, it's just source-code manipulation; it produces a single file that contains the source of your script and the modules it uses.

    ...the following was among the limitations listed for Devel::PreProcessor: ... use strict and no strict pragmas are removed ...

    Assuming your code already compiles under use strict, there's not much of an impact if you then remove that pragma.

    However, in hindsight the solution to this wasn't very difficult to implement, so I've made this change and released a new version of Devel::PreProcessor to CPAN; it should show up on your local mirror within a day or so.