Skip to content

Commit

Permalink
Document exportable functions, constants and :tags
Browse files Browse the repository at this point in the history
  • Loading branch information
timgimyee authored and mohawk2 committed Sep 1, 2019
1 parent 186caee commit ee172ee
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
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

0 comments on commit ee172ee

Please sign in to comment.