diff --git a/Changes b/Changes index c4d9458..d6123c8 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,6 @@ {{$NEXT}} - add AppVeyor CI + - Document exportable functions, constants and :tags 0.2309 2019-01-06 20:29:15Z - fix longstanding pod formatting error (issue #19, RT#109526) diff --git a/lib/File/Temp.pm b/lib/File/Temp.pm index 2dfc457..285487e 100644 --- a/lib/File/Temp.pm +++ b/lib/File/Temp.pm @@ -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: + + tmpnam + tmpfile + +=item :mktemp + +Exports the L: + + 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.