Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document exportable functions, constants and :tags #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{$NEXT}}
- add AppVeyor CI
- Add PERMS options to create temp file with given file permissions
- Document exportable functions, constants and :tags

0.2309 2019-01-06 20:29:15Z
- fix longstanding pod formatting error (issue #19, RT#109526)
Expand Down
50 changes: 50 additions & 0 deletions lib/File/Temp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2333,6 +2333,56 @@ Current API available since 0.15.

=back

=head1 EXPORTS

These functions are not exported by default but may be exported
individually:

tempfile
tempdir
unlink0
cleanup

The functions and constants in these export tags are exported by
default:

=over

=item :POSIX

Exports the L<POSIX functions|"POSIX FUNCTIONS">:

tmpnam
tmpfile

=item :mktemp

Exports the L<mktemp functions|"MKTEMP FUNCTIONS">:

mktemp
mkstemp
mkstemps
mkdtemp

=item :seekable

Exports the seek constants:

SEEK_SET
SEEK_CUR
SEEK_END

=back

So these two are equivalent:

use File::Temp;
use File::Temp qw/ :POSIX :mktemp :seekable /;

Use an empty list to export nothing:

use File::Temp ();

=head1 PACKAGE VARIABLES

These functions control the global state of the package.
Expand Down