11 *exports = \@{"${pack}::EXPORT"};
15 *exports = \%{"${pack}::EXPORT"};
17 grep(s/^&//, @exports);
18 @exports{@exports} = (1) x @exports;
19 foreach $extra (@{"${pack}::EXPORT_OK"}) {
23 foreach $sym (@imports) {
24 if (!$exports{$sym}) {
25 if ($sym !~ s/^&// || !$exports{$sym}) {
26 warn qq["$sym" is not exported by the $pack module ],
27 "at $callfile line $callline\n";
33 die "Can't continue with import errors.\n" if $oops;
38 foreach $sym (@imports) {
40 $type = $1 if $sym =~ s/^(\W)//;
41 *{"${callpack}::$sym"} =
42 $type eq '&' ? \&{"${pack}::$sym"} :
43 $type eq '$' ? \${"${pack}::$sym"} :
44 $type eq '@' ? \@{"${pack}::$sym"} :
45 $type eq '%' ? \%{"${pack}::$sym"} :
46 $type eq '*' ? *{"${pack}::$sym"} :
47 warn "Can't export symbol: $type$sym\n";
52 local ($callpack, $callfile, $callline) = caller($ExportLevel);
54 export $pack, $callpack, @_;