builtin::compat - Provide builtin functions for older perl versions
use builtin::compat qw( true false is_bool weaken unweaken is_weak blessed refaddr reftype created_as_string created_as_number ceil floor trim indexed );
Provides builtin functions for perl versions that do not include the builtin module.
No functions are exported by default.
This module does its best to behave similar to builtin, which creates its exported functions as lexicals. The functions will be created in the currently compiling scope, not the immediate caller of builtin::compat->import. The functions will also be removed at the end of the compilation scope using namespace::clean.
builtin::compat->import
The builtin functions will be used directly when they are available.
See "true" in builtin.
See "false" in builtin.
See "is_bool" in builtin.
Prior to perl 5.36, it was not possible to track boolean values fully accurately. This function will not be perfectly accurate on earlier perl versions.
See "weaken" in builtin.
See "unweaken" in builtin.
See "is_weak" in builtin.
See "blessed" in builtin.
See "refaddr" in builtin.
See "reftype" in builtin.
See "created_as_string" in builtin.
Prior to perl 5.36, it was not possible to check if a scalar value was created as a number or as a string fully accurately. This function will not be entirely accurate before then, but should be as accurate as is possible on these perl versions. In particular, a string like "12345" that has been used as a number will cause create_as_string to return false and created_as_number to return true.
create_as_string
created_as_number
See "created_as_number" in builtin.
Has the same caveats as created_as_string.
created_as_string
See "ceil" in builtin.
See "floor" in builtin.
See "trim" in builtin.
See "indexed" in builtin.
haarg - Graham Knop (cpan:HAARG) <haarg@haarg.org>
None so far.
Copyright (c) 2022 the builtin::compat "AUTHOR" and "CONTRIBUTORS" as listed above.
This library is free software and may be distributed under the same terms as perl itself. See https://dev.perl.org/licenses/.
To install builtin::compat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm builtin::compat
CPAN shell
perl -MCPAN -e shell install builtin::compat
For more information on module installation, please visit the detailed CPAN module installation guide.