source: for-distributions/trunk/bin/windows/perl/lib/Thread/Specific.pm@ 14489

Last change on this file since 14489 was 14489, checked in by oranfry, 17 years ago

upgrading to perl 5.8

File size: 469 bytes
Line 
1package Thread::Specific;
2
3our $VERSION = '1.00';
4
5=head1 NAME
6
7Thread::Specific - thread-specific keys
8
9=head1 SYNOPSIS
10
11 use Thread::Specific;
12 my $k = key_create Thread::Specific;
13
14=head1 DESCRIPTION
15
16C<key_create> returns a unique thread-specific key.
17
18=cut
19
20sub import : locked : method {
21 require fields;
22 fields::->import(@_);
23}
24
25sub key_create : locked : method {
26 our %FIELDS; # suppress "used only once"
27 return ++$FIELDS{__MAX__};
28}
29
301;
Note: See TracBrowser for help on using the repository browser.