Acme::MetaSyntactic's import
our $Theme = 'foo'; # default theme our %META; # fetch the list of standard themes { my @themes; for my $dir (@INC) { $META{$_} = 0 for grep !/^[A-Z]/, # remove the non-theme subclasses map { ( fileparse( $_, qr/\.pm$/ ) )[0] } File::Glob::bsd_glob( File::Spec->catfile( $dir, qw( Acme MetaSyntactic *.pm ) ) ); } } # the functions actually hide an instance my $meta = Acme::MetaSyntactic->new( $Theme ); sub import { ...