Acme::MetaSyntactic's import
sub import {
my $class = shift;
my @themes = ( grep { $_ eq ':all' } @_ )
? ( 'foo', grep { !/^(?:foo|:all)$/ } keys %META ) # 'foo' is still first
: @_;
$Theme = $themes[0] if @themes;
$meta = Acme::MetaSyntactic->new( $Theme );
# export the metaname() function
no strict 'refs';
my $callpkg = caller;
*{"$callpkg\::metaname"} = \&metaname; # standard theme
# load the classes in @themes
for my $theme( @themes ) {
eval "require Acme::MetaSyntactic::$theme;";
croak $@ if $@;
*{"$callpkg\::meta$theme"} = sub { $meta->name( $theme, @_ ) };
}
}
Dann werden alle verf�gbaren Listen-Module (in %META
) verwendet.