amigo has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to build a couple of minimal installations of perl and I find lots of zero-byte files when installing -usually with the '.bs' file extension. Are these files some sort of placeholder or are they unneeded?

Replies are listed 'Best First'.
Re: Empty perl *.bs files
by almut (Canon) on Dec 08, 2008 at 14:38 UTC

    They are bootstrap files for DynaLoader:

    bootstrap()

    (...)
    It performs the following actions:
    • (...)
    • executes an auto/$module/$module.bs file if it exists (typically used to add to @dl_resolve_using any files which are required to load the module on the current platform)

    You can safely get rid of them when they're empty.  Also see here.

      Aaah! So that's what bs stands for!

      I gotta say, given that

      1. They are always(*) empty.

        *I just grepped my very mature 5.8.6 perl subtree and found 935 *.bs files which are all empty:

        1 File(s) 0 bytes 1 File(s) 0 bytes 1 File(s) 0 bytes 935 File(s) 0 bytes 0 Dir(s) 14,929,285,120 bytes free C:\test>dir /s \perl\*.bs | find "bytes" | wc -l 937
      2. That there is an entire subtree 2, 3 even 4 levels deep that exists only to support the existance of this empty file (and sometimes and equally useless empty .exists file!).

      That was not the definition of BS I've had in mind for the last few years.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

        That was not the definition of BS I've had in mind for the last few years.

        That whole directory tree is just full of BS...

      Thank you all for your answers. I didn't receive a notification that there had been answers to my thread. FYI, I am running perl-5.8.8 on Linux which I have compiled myself with normal options selected. I noticed quite a few of these empty files and while disk space is cheap, knowledge is not. I'm just a stickler for not including useless crap in program packages, so I needed to know if these files were needed at runtime. Thanks to all for your help.
Re: Empty perl *.bs files
by Bloodnok (Vicar) on Dec 08, 2008 at 14:00 UTC
    I've noticed similar files - when building & installing XS modules (AFAIR, only on Windoze installations). Given that...
    1. they appear to appear as a result of building the module
    2. they are of zero length &
    3. disk space is cheap,
    ... I chose to leave them alone.

    A user level that continues to overstate my experience :-))
Re: Empty perl *.bs files
by swampyankee (Parson) on Dec 08, 2008 at 13:27 UTC

    Could you please supply the Monks with information about the O/S you're using and the version of Perl which you are installing? My guess would be that if you're using an installer or a make variant, any temp files will be cleared out as part of the clean-up which should be part of a successful completion.


    Information about American English usage here and here. Floating point issues? Please read this before posting. — emc