require subs; my @autogen = qw(Foo Bar Trope Cliche); foreach my $thing (@autogen) { my @subs = map "$_$thing", qw(High Low Middle); push @EXPORT_OK, @subs; subs->import(@subs); } sub AUTOLOAD { if ($AUTOLOAD =~ /@{[__PACKAGE__]}::(High|Low|Middle)(\w+)$/ and grep($2 eq $_, @autogen) ) { my $sub = $dispatch{$1}; my $thing = $2; *$AUTOLOAD = sub { $sub->(thing => $thing, args => [@_]) }; goto &$AUTOLOAD; } else { $AutoLoader::AUTOLOAD = $AUTOLOAD; goto &AutoLoader::AUTOLOAD; } }