=begin pod

=head1 NAME

Raku port of Perl's built-ins

=head1 SYNOPSIS

=begin code :lang<raku>
use P5built-ins;   # import all P5 built-in functions supported

use P5built-ins <gmtime>;  # only import specific ones

say gmtime now;  # (38 17 12 22 7 126 6 233 0 0 UTC)
=end code

=head1 DESCRIPTION

This module provides an easy way to import a growing number of built-in
functions of Perl in Raku  Currently supported at:

=begin output
abs caller chdir chomp chop chr closedir cos crypt defined each endgrent
endnetent endprotoent endpwent endservent exp fileno getgrent getgrgid
getgrnam getlogin getnetbyaddr getnetbyname getnetent getpgrp getppid
getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam
getpwuid getservbyname getservbyport getservent gmtime hex index lcfirst
length localtime log oct opendir ord pack print printf quotemeta rand
readdir readlink ref reset reverse rewinddir rindex say seek seekdir
setgrent setnetent setpriority setprotoent setpwent setservent sin sleep
sqrt substr telldir times ucfirst undef unpack
=end output

The following file test operators are also available:

=begin output
-r -w -x -e -f -d -s -z -l
=end output

And the following terms:

=begin output
__FILE__ __LINE__ __PACKAGE__ __SUB__ SEEK_CUR SEEK_END SEEK_SET
STDERR STDIN STDOUT
=end output

=head1 PORTING CAVEATS

Please look at the porting caveats of the underlying modules that actually
provide the functionality:

=table
module           | built-in functions
-----------------+-------------------
P5caller         | caller
P5chdir          | chdir
P5chomp          | chomp chop
P5chr            | chr ord
P5defined        | defined undef
P5each           | each
P5fileno         | fileno
P5getgrnam       | endgrent getgrent getgrgid getgrnam setgrent
P5getnetbyname   | endnetent getnetbyname getnetbyaddr getnetent setnetent
P5getpriority    | getpriority setpriority getppid getpgrp
P5getprotobyname | endprotoent getprotobyname getprotobynumber getprotoent setprotoent
P5getpwnam       | endpwent getlogin getpwent getpwnam getpwuid setpwent
P5getservbyname  | endservent getservbyname getservbyport getservent setservent
P5hex            | hex oct
P5lcfirst        | lcfirst ucfirst
P5length         | length
P5localtime      | localtime gmtime
P5math           | abs cos crypt exp log rand sin sqrt
P5opendir        | opendir readdir telldir seekdir rewinddir closedir
P5pack           | pack unpack
P5print          | print printf say
P5readlink       | readlink
P5ref            | ref
P5reset          | reset
P5reverse        | reverse
P5times          | times
P5-X             | -r -w -x -e -f -d -s -z -l

=head1 AUTHOR

Elizabeth Mattijsen <liz@raku.rocks>

Source can be located at: https://github.com/lizmat/P5built-ins . Comments and
Pull Requests are welcome.

If you like this module, or what I'm doing more generally, committing to a
L<small sponsorship|https://github.com/sponsors/lizmat/>  would mean a great
deal to me!

=head1 COPYRIGHT AND LICENSE

Copyright 2018, 2019, 2020, 2021, 2025, 2026 Elizabeth Mattijsen

Re-imagined from Perl as part of the CPAN Butterfly Plan.

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

=end pod

# vim: expandtab shiftwidth=4
