One way would be to build an object of a "class of classes". The user would be required to call a constructor first, much like DBI->connect, which will initialise all that is required. This then returns a blessed ref which is used for a method call to create an object of the required class, much like getting a statement handle in DBI, by calling the prepare method on the database handle.
Of course there is always the BEGIN block...