The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

builtins - Install all the new builtins from the builtin namespace

VERSION

This document describes builtins version 0.000001

SYNOPSIS

    use v5.36;     # Or later
    use builtins;  # Loads all new builtins into lexical scope

    # So now we can write...
    if (reftype($x) eq 'ARRAY' || blessed($x) {
        say refaddr($x);
        if (is_weak($x)) {
            unweaken($x);
            say ceil( refaddr(($x)) / floor($y) );
            weaken($x);
            say trim($description);
        }
    }

    no builtins;  # And now they're all gone!

DESCRIPTION

Perl 5.36 introduced numerous new built-in functions to the core. Unfortunately, for backwards compatibility, none of them are automatically available. And all of them are still experimental.

Which means, if you want them all, you have to preface your code with:

    use experimental 'builtin';
    use builtin qw(
        ceil    floor     trim
        true    false     is_bool
        weaken  unweaken  is_weak
        blessed refaddr   reftype   indexed
        created_as_string created_as_number
    );

Or you can use this module and get the same effect with just:

    use builtins;

INTERFACE

None.

You simply use the module and it takes care of installing every available builtin built-in into the current lexical scope (just like a use builtin qw(...) would). It also turns off the "experimental" warnings about each built-in it installs.

Or you write no builtins and they are all removed.

DIAGNOSTICS

None.

CONFIGURATION AND ENVIRONMENT

builtins requires no configuration files or environment variables.

DEPENDENCIES

builtins requires Perl 5.36 or later. It has no other dependencies.

INCOMPATIBILITIES

None reported.

It is specifically compatible with builtin, so you can still use builtins if you've already said use builtin (and vice versa).

BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to bug-builtins@rt.cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR

Damian Conway <DCONWAY@CPAN.org>

LICENCE AND COPYRIGHT

Copyright (c) 2022, Damian Conway <DCONWAY@CPAN.org>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.