This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Remove stale code from Thread.xs.
[perl5.git]
/
lib
/
fields.pm
1
package fields;
2
3
sub import {
4
my $class = shift;
5
my ($package) = caller;
6
my $fields = \%{"$package\::FIELDS"};
7
my $i = $fields->{__MAX__};
8
foreach my $f (@_) {
9
if (defined($fields->{$f})) {
10
require Carp;
11
Carp::croak("Field name $f already in use");
12
}
13
$fields->{$f} = ++$i;
14
}
15
$fields->{__MAX__} = $i;
16
}
17
18
1;