6 my ($callpack, $callfile, $callline) = caller($ExportLevel);
9 *exports = \@{"${pack}::EXPORT"};
13 *exports = \%{"${pack}::EXPORT"};
15 grep(s/^&//, @exports);
16 @exports{@exports} = (1) x @exports;
18 foreach $sym (@imports) {
19 if (!$exports{$sym}) {
20 if ($sym !~ s/^&// || !$exports{$sym}) {
21 warn "$sym is not exported by the $pack module ",
22 "at $callfile line $callline\n";
28 die "Can't continue with import errors.\n" if $oops;
33 foreach $sym (@imports) {
35 $type = $1 if $sym =~ s/^(\W)//;
36 *{"${callpack}::$sym"} =
37 $type eq '&' ? \&{"${pack}::$sym"} :
38 $type eq '$' ? \${"${pack}::$sym"} :
39 $type eq '@' ? \@{"${pack}::$sym"} :
40 $type eq '%' ? \%{"${pack}::$sym"} :
41 $type eq '*' ? *{"${pack}::$sym"} :
42 warn "Can't export symbol: $type$sym\n";