Good news!  I got all our patches updated for perl 5.36.0.  To skip the
summary of new features, jump down to the bottom for details on how you
can help test it.

I missed 5.34 due to non-computer projects that got in the way, but that
means this update has twice the cool newness.  Skip to the end for
details about getting the patched version and testing it out.

There wasn't a whole lot in perl 5.34, mostly p5p worked on changes to
the governance model.  They also came up with an RFC process to try to
overcome some of the bikeshedding that the perl community has turned
into an art form.

The one big new feature in 5.34 was experimental try/catch support, but
you can read all about it in the 5.34 perldelta.

https://metacpan.org/release/XSAWYERX/perl-5.34.0/view/pod/perldelta.pod

On the other hand, that RFC process and the new governance model
unblocked a bunch of changes, the most anticipated being that the long
experimental signatures are now considered stable, with the one caveat
that using @_ inside a signatured sub is still experimental.

In addition, we're up to Unicode 14, which means I'll be sending in an
update to en_US.UTF-8.src before long.

Another really nice new feature is that it's now possible to tell that a
value is a "boolean".  That is, `!!1` is a magic "true" value and `!!0`
is magic false (other boolean things like `1 == 1` also return these
booleans).  There are new functions that can use these values to find
out if a value is not only "truthy" or "falsy", but whether it is one of
these booleans.  The primary use for this is in serializers like JSON
that can now output these values as true and false.

The feature that I'm most excited for, and probably what will make me
`use v5.36` in my scripts is multi-value iteration.  Examples from the
docs:

    for my ($key, $value) (%hash) { ... }
    for my ($left, $right, $gripping) (@moties) { ... }

Another solution to the bikeshedding led to a lot of new built-ins,
which live in a new "builtin" namespace for functions.  While you can
import these like any other, they are always available as
`builtin::function()`.   This allowed implementing a lot of new
functions, like builtin::trim to strip leading and trailing whitespace
from a string "correctly".  The discussion of that was amusing with
several examples with "I just do $this", with the reply of "the bug in
that way is $explanation".  A few of the other builtins, like indexed,
true, false, and is_bool go along with the earlier features like
multi-for and stable booleans.  Several things just led to more
optimized and easier to access implementations of things that shipped
with perl in other modules already like blessed, weaken, refaddr, and
reftype.  This isn't the full list, so go read the details in the delta.

The final big new feature, which presents and is documented as two
features are the experimental defer and finally (for the new try/catch)
blocks.  They both run code at the end of a scope, although for
different reasons.

Read the whole delta for a better explanation of these new things as
well as other improvements and new modules.

https://metacpan.org/release/RJBS/perl-5.36.0/view/pod/perldelta.pod

I did additionally pull in the latest version of Compress::Raw::Zlib
that uses the upstream fix for the recent zlib CVE, although we still
link perl against system zlib.  The upgrade also allows the tests for
that module to pass with the system zlib on my macppc.

You can see full test results for the architectures I have on Github
https://github.com/afresh1/OpenBSD-perl/tree/blead/build_logs/5.36.0

If you have an architecture that I don't, or just want to try out the
new perl, there are instructions in the README in that repository.

https://github.com/afresh1/OpenBSD-perl

    download the patches and scripts
                https://github.com/afresh1/OpenBSD-perl/archive/blead.tar.gz
                and extract someplace
                or git clone https://github.com/afresh1/OpenBSD-perl.git
    download perl-5.36.0.tar.gz into the same directory
        https://cpan.metacpan.org/authors/id/R/RJ/RJBS/perl-5.36.0.tar.gz
    cd to someplace you have room
    run /path/to/OpenBSD-perl/build_perl
    wait
    send me the log file(s) it generates

If it was successful, you can also follow the instructions at the end to
use `make -f Makefile.bsd-wrwapper install` to install it as your system
perl, although that may cause issues with any XS code that you don't
compile yourself, such as those in packages.

There are also some files that have been removed, if you've installed
the new perl:

rm -rf /usr/lib/libperl.so.22.0 \
       /usr/libdata/perl5/*/CORE/stadtx_hash.h \
       /usr/libdata/perl5/pod/perldos.pod \
       /usr/libdata/perl5/pod/perlmacos.pod \
       /usr/libdata/perl5/pod/perlnetware.pod \
       /usr/libdata/perl5/pod/perlsymbian.pod \
       /usr/libdata/perl5/unicore/To/Digit.pl \
       /usr/libdata/perl5/unicore/To/Fold.pl \
       /usr/libdata/perl5/unicore/To/Lower.pl \
       /usr/libdata/perl5/unicore/To/Title.pl \
       /usr/libdata/perl5/unicore/To/Upper.pl \
       /usr/libdata/perl5/unicore/lib/InSC/Consona9.pl

I'll next be working on testing some port updates with the new perl, and
making sure I can import it properly.

You can download a pre-patched version of perl that could replace
/usr/src/gnu/usr.bin/perl if you want to build a release with perl
5.36.0.

https://cvs.afresh1.com/~andrew/perl-update/OpenBSD-perl-5.36.0.tar.gz

I look forward to seeing test reports.

-- 
andrew

Reply via email to