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 committed Oct 25, 2018
1 parent f172660 commit 63abdbc
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions lib/File/Temp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2318,6 +2318,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 63abdbc

Please sign in to comment.