Dear Monks

I am interested to see if I could speedup the initialization of my perl program, by compiling it.

However all the attempts result in an error.
Here is my test program
#!/usr/bin/perl -l use strict; use warnings; use DateTime ; print "hello" ;
I tried to compile it like
$> perlcc -o out t20.pl /usr/bin/perlcc: t20.pl did not compile, which can't happen:Starting c +ompile Walking tree DateTime::Locale::Base saved (it is in DateTime::Locale::root's @ISA) DateTime::TimeZone saved (it is in DateTime::TimeZone::UTC's @ISA) DateTime::TimeZone::OffsetOnly saved (it is in DateTime::TimeZone::Fl +oating's @ISA) DateTime saved (it is in DateTime::Infinite's @ISA) Prescan Saving methods Can't locate object method "IVX" via package "B::NV" at /usr/lib/perl +5/5.8.8/i586-linux-thread-multi/B/C.pm line 650. CHECK failed--call queue aborted.
and
$> perl -MO=CC,-ot20.c t20.pl Can't locate object method "_save_common_middle" via package "B::FAKEO +P" at /usr/lib/perl5/5.8.8/i586-linux-thread-multi/B/C.pm line 389. CHECK failed--call queue aborted.

Any suggestion how to fix the problems with the B package ?

Thanks a lot
LuCa

Update: I have to add that perlcc compiles only when I ommit 'use DateTime'
Update2: Thnx for the suggestions, I'll try mod_perl and PAR!

In reply to Error when compiling perl-script to executable by jeanluca

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.