use strict;
no strict 'refs';
# On one line so MakeMaker will see it.
=head1 NAME
Exporter::Heavy - Exporter guts
=head1 SYNOPSIS
(internal use only)
=head1 DESCRIPTION
No user-serviceable parts inside.
=cut
#
# We go to a lot of trouble not to 'require Carp' at file scope,
# because Carp requires Exporter, and something has to give.
#
sub _rebuild_cache {
s/^&// foreach @$exports;
my $ok = \@{"${pkg}::EXPORT_OK"};
if (@$ok) {
s/^&// foreach @$ok;
}
}
sub heavy_export {
# First make import warnings look like they're coming from the "use".
my $text = shift;
require Carp;
}
else {
warn $text;
}
};
require Carp;
Carp::croak("$_[0]Illegal null symbol in \@${1}::EXPORT")
};
if (@imports) {
if (!%$export_cache) {
$cache_is_current = 1;
}
if (grep m{^[/!:]}, @imports) {
my $tagsref = \%{"${pkg}::EXPORT_TAGS"};
my $tagdata;
my %imports;
# negated first item implies starting with default set:
if ($spec =~ s/^://){
if ($spec eq 'DEFAULT'){
}
}
else {
++$oops;
next;
}
}
elsif ($spec =~ m:^/(.*)/$:){
my $patn = $1;
}
else {
}
if ($remove) {
}
else {
}
}
}
my @carp;
if (!$export_cache->{$sym}) {
if ($sym =~ m/^\d/) {
# If the version number was the only thing specified
# then we should act as if nothing was specified:
if (@imports == 1) {
last;
}
# We need a way to emulate 'use Foo ()' but still
# allow an easy version check: "use Foo 1.23, ''";
@imports = ();
last;
}
# Last chance - see if they've updated EXPORT_OK since we
# cached it.
unless ($cache_is_current) {
%$export_cache = ();
$cache_is_current = 1;
}
if (!$export_cache->{$sym}) {
# accumulate the non-exports
push @carp,
$oops++;
}
}
}
}
if ($oops) {
require Carp;
Carp::croak("@{carp}Can't continue after import errors");
}
}
else {
}
if (@$fail) {
if (!%$fail_cache) {
# Build cache of symbols. Optimise the lookup by adding
# barewords twice... both with and without a leading &.
# (Technique could be applied to $export_cache at cost of memory)
}
my @failed;
if (@failed) {
require Carp;
"on this architecture");
}
if (@failed) {
require Carp;
Carp::croak("Can't continue after import errors");
}
}
}
warn "Importing into $callpkg from $pkg: ",
# shortcut for the common case of no type character
(*{"${callpkg}::$sym"} = \&{"${pkg}::$sym"}, next)
unless $sym =~ s/^(\W)//;
$type = $1;
*{"${callpkg}::$sym"} =
}
}
{
my $pkg = shift;
my $level = shift;
(undef) = shift; # XXX redundant arg
}
# Utility functions
sub _push_tags {
my @nontag = ();
my $export_tags = \%{"${pkg}::EXPORT_TAGS"};
push(@{"${pkg}::$var"},
map { $export_tags->{$_} ? @{$export_tags->{$_}}
: scalar(push(@nontag,$_),$_) }
if (@nontag and $^W) {
# This may change to a die one day
require Carp;
}
}
sub heavy_require_version {
}
sub heavy_export_tags {
}
sub heavy_export_ok_tags {
}
1;