Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Perl 5.34 is released

by 1nickt (Canon)
on May 21, 2021 at 09:22 UTC ( [id://11132842]=perlnews: print w/replies, xml ) Need Help??

Perl version 5.34 is now available. perldelta.


The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re: Perl 5.34 is released
by syphilis (Archbishop) on May 22, 2021 at 12:57 UTC
    perldelta

    The entry that pleases me most is:
    perl can now be built with USE_QUADMATH on MS Windows using (32-bit an +d 64-bit) mingw-w64 ports of gcc.
    And that's not something that's experimental !!

    Of course, some are not interested in this.
    (Others, even less so ;-)

    Cheers,
    Rob

      You're welcome. I've been adding tickets to CPAN modules for quadmath since it was enabled. I run it in production on my laptop and fed back all issues to p5p and was glad to see all were dealt with.

      To *me*, the fix to pack "D" to cope with quadmath was the most important one as it broke installing modules down the chain. Thanks leont for fixing that!


      Enjoy, Have FUN! H.Merijn
        To *me*, the fix to pack "D" to cope with quadmath was the most important one as it broke installing modules down the chain. Thanks leont for fixing that!

        I absolutely agree that this needed to be fixed - but I still have reservations about the actual fix that was implemented, and I raised those reservations (which were dismissed) in the discussions of that issue.

        In perl 5.32 and earlier, if you are running a perl whose nvtype was double, and you try to pack/unpack using the "D" template, here's what you get:
        C:\>perl -wle "$d = unpack 'D>', pack 'D>', 2.9; print $d" Invalid type 'D' in pack at -e line 1.
        I regard that as a sane and sensible result.
        Now, thanks to that fix, on a perl-5.34.0 whose nvtype is double, we get:
        C:\>perl -wle "$ld = unpack 'D>', pack 'D>', 2.9; print $ld" 2.9
        with no mention that $ld is not a long double, even though a "long double" has been specifically requested via the "D" template.
        I think the view is that no-one is going to make that mistake.
        But I still wonder why we would want to allow the use of "D" template on a perl whose nvtype is double, given that the "D" template is entirely useless and pointless in that circumstance.
        Anyway ... it's done now, and I shall live it with it.

        The "pack" documentation for "D" now, as of perl-5.34.0, looks questionable to me:
        D A float of long-double precision in native format. (Long doubles are available only if your system supports long double values. Raises an exception otherwise. Note that there are different long double formats.)
        Do you really think that accurately describes the behaviour of the "D" template on a perl-5.34.0 with nvtype of double ?

        Cheers,
        Rob
Re: Perl 5.34 is released
by stevieb (Canon) on May 21, 2021 at 16:35 UTC

    I'll be damned... try/catch! Yay!

      G'day stevieb,

      You may already know what follows. This information is for those who don't.

      The try/catch feature is experimental.

      Any usage should be preceded by these lines (in the order shown):

      no warnings 'experimental::try'; use feature 'try';

      Avoid all experimental features, including this one, in any production-grade code.

      See "perlsyn: Try Catch Exception Handling" for more details.

      — Ken

        Simpler:

        use experimental qw( try );

        Seeking work! You can reach me at ikegami@adaelis.com

Re: Perl 5.34 is released
by GrandFather (Saint) on May 23, 2021 at 10:10 UTC

    A first class try/catch will be nice if it becomes a permanent feature, but I love

    # qr/{,n}/ is now accepted
    Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

      # qr/{,n}/ is now accepted

      I find this code very unfortunate, what does it mean if the empty string can be repeated n times?

      This could better be either a syntax error. But I'm rather expecting Perl not reading the curlies as metas.

      from the delta

      An empty lower bound is now accepted for regular expression quantifiers, like {,3}.

      so {,3} is the same like {0,3} or {1,3} ?

      please elaborate!

      edit

      to demonstrate my point

      DB<8> $re = qr/{0,3}/ DB<9> p "" =~ $re DB<10> p "{0,3}" =~ $re 1 DB<11> p $] 5.032001 DB<12> DB<13> use warnings; use strict; my $re = qr/{,3}/ DB<14>

      the curlies are taken literally!

      qr/{,3}/ was always allowed.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery

        "qr/{,3}/ was always allowed"

        Nope.

        $ perl -E 'say $]' 5.032001
        $ perl -Mstrict -wE 'my $str = "foobar"; say 1 if $str =~ /[o]{1,2}/' 1
        $ perl -Mstrict -wE 'my $str = "foobar"; say 1 if $str =~ /[o]{,2}/' Unescaped left brace in regex is illegal here in regex; marked by <-- +HERE in m/[o]{ <-- HERE ,2}/ at -e line 1.


        The way forward always starts with a minimal test.
Re: Perl 5.34 is released
by xiaoyafeng (Deacon) on May 24, 2021 at 07:58 UTC
    It looks like a preversion of perl7. keep it up!




    I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

      i read perversion and got me puzzled for a while! (nothing wrong with your post but with my eyes)

        That's why English is a difficult language to me! lol




        I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

      ...except all the experimental features that were going to be on by default in Perl 7 (e.g. refaliasing) were left experimental. They're good enough to not only be safe but to be on by default, but they're still experiemental!?

      Seeking work! You can reach me at ikegami@adaelis.com

        agree! I think it implicitly means perl7 won't be released before 5.40?




        I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlnews [id://11132842]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-16 09:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found