Skip to content

Commit d483f63

Browse files
timgimyeemohawk2
authored andcommitted
Document exportable functions, constants and :tags
1 parent 441aa56 commit d483f63

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

Changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{{$NEXT}}
22
- add AppVeyor CI
3+
- Document exportable functions, constants and :tags
34

45
0.2309 2019-01-06 20:29:15Z
56
- fix longstanding pod formatting error (issue #19, RT#109526)

lib/File/Temp.pm

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2318,6 +2318,56 @@ Current API available since 0.15.
23182318
23192319
=back
23202320
2321+
=head1 EXPORTS
2322+
2323+
These functions are not exported by default but may be exported
2324+
individually:
2325+
2326+
tempfile
2327+
tempdir
2328+
unlink0
2329+
cleanup
2330+
2331+
The functions and constants in these export tags are exported by
2332+
default:
2333+
2334+
=over
2335+
2336+
=item :POSIX
2337+
2338+
Exports the L<POSIX functions|"POSIX FUNCTIONS">:
2339+
2340+
tmpnam
2341+
tmpfile
2342+
2343+
=item :mktemp
2344+
2345+
Exports the L<mktemp functions|"MKTEMP FUNCTIONS">:
2346+
2347+
mktemp
2348+
mkstemp
2349+
mkstemps
2350+
mkdtemp
2351+
2352+
=item :seekable
2353+
2354+
Exports the seek constants:
2355+
2356+
SEEK_SET
2357+
SEEK_CUR
2358+
SEEK_END
2359+
2360+
=back
2361+
2362+
So these two are equivalent:
2363+
2364+
use File::Temp;
2365+
use File::Temp qw/ :POSIX :mktemp :seekable /;
2366+
2367+
Use an empty list to export nothing:
2368+
2369+
use File::Temp ();
2370+
23212371
=head1 PACKAGE VARIABLES
23222372
23232373
These functions control the global state of the package.

0 commit comments

Comments
 (0)