Hi All,

I am new to Perl and experimenting static linking of modules in Perl. I have compiled a Perl without support for dynamic loading.

Normally I link any modules using xs_init call. Say If I were to load a module Filter::Util::Call, I will create a entry within xs_init function, which in turn is passed as argument to perl_parse.

xs_init(pTHX) { char *file = __FILE__; dXSUB_SYS; newXS("Filter::Util::Call::bootstrap", boot_Filter__Util__Call,file); }
PerlInterpreter *my_perl; #allocate memory for my_perl, construct my_perl, system initialization + ... perl_parse(my_perl, xs_init, argc, args, loc_environ);

Now I am trying to use DB_File module. Seems like DB_File depends on AUTOLOAD. Is there a way where can I statically load DB_File module as shown above. Or am I missing something about DB_File.


In reply to Static linking of DB_File by manku

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.