package TheDb; use strict; use TheDb::PlainText; use TheDb::SQL; sub new { my $class = shift; my $type = shift; my $full_name = "TheDB::" . $type; return $full_name->new; } 1;