in reply to Re: Class::DBI and compiling
in thread Class::DBI and compiling

I compiled it and have instructed the compiler to include all necessary modules. The problem is that require calls the module in at run-time, not compile time.

Replies are listed 'Best First'.
Re^3: Class::DBI and compiling
by Corion (Patriarch) on Jul 10, 2014 at 14:09 UTC

    Perl has no compiler.

    So, how did you compile the script, and how did you instruct the compiler to include all necessary modules?

      Not in the traditional sense, but there is most certainly a Perl to C transformation tool that compiles generated C against libperl, B::C (perlcc). Many people refer to this as the "Perl compiler."

        I watched this talk from YAPC:NA, it seems that it's not as straightforward or easy path as those who champion it would have us believe, the docs are going to deter people from using it.

Re^3: Class::DBI and compiling
by marto (Cardinal) on Jul 10, 2014 at 14:10 UTC

    Which 'compiler'?

      ActiveState's PerlApp. I use Moose in the program as well, however I don't have that installed on the machine that's running the program either, and that works by instructing the compiler to include that module.

        "PerlApp is not a compiler.". This is a packaging tool, like pp. If you were using pp I'd suggest you use the -x option:

        "Run perl inputfile to determine additonal run-time dependencies."

        You'd have to check the documentation for the equivalent of that, or pps -M option.

        Update: If you update your post please mark changes, touched on in How do I post a question effectively?