Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Here is perlbrew(0.58) help, section "install":

    install options perl-<version>
    install options <version>
        Build and install the given version of perl.

        Version numbers usually look like "5.x.xx", or "perl-5.xx.x-RCx" for
        release candidates.

        The specified perl is downloaded from the offical CPAN website or
        from the mirror site configured before.

        To configure mirror site, invoke `mirror` command.

    install options perl-blead
    install options blead
        A special way to install the blead version of perl, which is
        downloaded from this specific URL regardless of mirror settings:


    install options /path/to/perl/git/checkout/dir
        Build and install from the given git checkout dir.

    install options /path/to/perl-5.14.0.tar.gz
        Build and install from the given archive file.

    install options
        Build and install from the given URL. Supported URL schemes are
        "http://", "https://", "ftp://" and "file://".

    Options for "install" command:

        -f --force     Force installation
        -j $n          Parallel buildng and testing. ex. C<perlbrew install -j 5 perl-5.14.2>
        -n --notest    Skip testing

           --as        Install the given version of perl by a name.
                       ex. C<perlbrew install perl-5.6.2 --as legacy-perl>

        -D,-U,-A       Switches passed to perl Configure script.
                       ex. C<perlbrew install perl-5.10.1 -D usemymalloc -U uselargefiles>

        --sitecustomize $filename
                       Specify a file to be installed as

    By default, all installations are configured after their name like this:

        sh Configure -de -Dprefix=$PERLBREW_ROOT/perls/<name>

Therefore, the command to install perl 5.16.0 with thread support and to give that perl the name "perl-5.16.0t" should be this:

$ perlbrew install --as perl-5.16.0t -Dusethreads perl-5.16.0

And in fact, I tried that command on Mac OSX 10.6.8, and I was able to successfully install a perl named perl-5.16.0t:

$ perlbrew list * perl-5.16.0 #this perl was already installed perl-5.16.0t #this is the new install $perlbrew use perl-5.16.0t $perlbrew list perl-5.16.0 * perl-5.16.0t

And here's a test program:

use strict; use warnings; use 5.012; use threads; use threads::shared; my $counter :shared; $counter = 1; my $name = 'Joe'; sub do_stuff { my $thread_id = shift; sleep rand 10; say "thread number $thread_id"; say "count: $counter"; $counter++; say $name; $name = "Cathy"; } my @threads; for my $thread_number (1..10) { push @threads, threads->create('do_stuff', $thread_number); } for (@threads) { $_->join; } --output:-- thread number 5 count: 1 Joe thread number 9 count: 2 Joe thread number 3 count: 3 Joe thread number 7 count: 4 Joe thread number 10 count: 5 Joe thread number 4 count: 6 Joe thread number 6 count: 7 Joe thread number 8 count: 8 Joe thread number 1 count: 9 Joe thread number 2 count: 10 Joe

To set perl-5.16.0t as the default when you start up a shell:

$ perlbrew switch perl-5.16.0t

It's possible that the -f option for the perlbrew alias command is the same as for the install command. But in any case, options are optional--that is what the brackets around the option mean--so if you don't know what an option does, then don't use that option.

perlbrew help also says this:

Generic command options: -q --quiet Be quiet on informative output message. -v --verbose Tell me more about it.

The -v option isn't used to specify the perl version, so you can omit it.

In reply to Re: App::perlbrew - Compiling Perl with thread support by 7stud
in thread App::perlbrew - Compiling Perl with thread support by kcott

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    [usemodperl]: Because the audience for my apps have old, locked down versions of perl that can't install modules or update perl and now all that is horribly broken without HTTP. Of course I can go outside Perl anytime but that impacts portability
    [usemodperl]: I can find cpan mirrors on http but not with plain files, only tar.gz, does something like meta exist on http?
    [marto]: run your own mirror minicpan
    [marto]: or just fatpack/package your apps
    [Corion]: usemodperl: No. I think your approach to "downloading modules" is horribly misguided. I recommend you use the standard tools, and/or move your own tools to standard interfaces. Or maybe just set up your own plaintext mirror if that's what you need.
    [Corion]: usemodperl: If your "audience" runs old, locked-down computers that can connect to the outside world, they shouldn't install random stuff from CPAN. Especially, as many modules on CPAN don't work with 5.005_004 anymore.
    [usemodperl]: downloading modules is wrong? oh dear...
    [usemodperl]: just answer my question without judging me or my technique, if that's possible around here anymore, sheesh
    [Corion]: usemodperl: You should be well aware of the ways to make your approach still work, even if it is to set up your own proxy that strips HTTPS. It shouldn't be hard for somebody with your acumen.

    How do I use this? | Other CB clients
    Other Users?
    Others musing on the Monastery: (10)
    As of 2018-06-24 16:19 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (126 votes). Check out past polls.