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

I am setting up a new machine (macOS Monteray, Intel) and I need to install a recent Perl WITHOUT multithreat support. Unfortunately, a package I need (Tcl.pm) does not install with Multithreat. I usually install the latest Perl with

brew install perl

For the first time, I get installed a multithread version of Perl. I do not seem to be able to find a brew formula for a non-multithread version. Any solution? Or do I need to compile my version (which I was trying to avoid, since I have no experience in this). Thank you

Replies are listed 'Best First'.
Re: brew install perl
by Anonymous Monk on Apr 08, 2022 at 11:04 UTC

    I moved to using perlbrew and was able to install (however not the latest 5.34.0).

Re: brew install perl
by Anonymous Monk on Apr 08, 2022 at 15:49 UTC

    Building your own Perl is not that hard -- just time-consuming, and a lot of that is just waiting for tests to run should you choose to do them.

    1. Install XCode, if you have not already done so.
    2. Install the XCode command line tools if you have not already done so: $ xcode-select --install.
    3. Decide where Perl should live. Create that directory. For the purposes of the following write-up, call the new directory "the-directory-you-want-Perl-to-live-in". For convenience in running the configure script, also create a bin/ directory under it.
    4. Download the kit from CPAN into a working directory, expand it, and cd to the kit directory.
    5. Configure Perl: $ ./Configure -Dprefix=the-directory-you-want-Perl-to-live-in. Answer a bunch of questions, defaulting almost all of them.
    6. Build Perl: $ make.
    7. Test Perl if desired: $ make test.
    8. Install Perl: $ make install. If you are installing in a system directory you may need to $ sudo make install.
    9. Add the bin/ directory to your PATH.

    Installing a system-wide Perl under macOS has become increasingly difficult as Apple places more restrictions on system access. Mine currently lives in /Users/Shared/. You could also put it in your personal directory somewhere.