in reply to What is 'bootstrap'?

See xsutils.c (part of the source code to Perl itself), which includes a function XS_attributes_boostrap() which was probably produced using XS and then just cut'n'pasted into xsutils.c. Then see this code (in that same file):

void Perl_boot_core_xsutils(pTHX) { char *file = __FILE__; newXS("attributes::bootstrap", XS_attributes_bootstrap, file +); }
which defines *attributes::bootstrap to have a Perl code reference that calls the previously named C routine.

BTW, this stuff (for modules that are bundled with Perl) is normally done by putting stuff in the ext subdirectory of the Perl source code tree. For example, see ext/attrs. I guess they didn't want to give people the ability to build Perl without including attributes.xs inside the base Perl run-time.

Update: Yes, you've got it -- and other updates applied (inside bold parens).

        - tye

Replies are listed 'Best First'.
Re: (tye)Re: What is 'bootstrap'?
by John M. Dlugosz (Monsignor) on Nov 12, 2002 at 19:43 UTC
    So, the function attributes::bootstrap is linked into the perl executable, which is why there is no ext/auto files and this function doesn't need to be defined in the pm file.

    And, that's unusual. We expect it to be loaded dynamically and keep as much as possible out of the core.

    Have I got it?

    —John