in reply to checking for preloaded modules

To answer your first question, you could always check to see if the symbol table entries exist. For example:
> perl print "Data::Dumper exists\n" if %Data::Dumper::; > perl -MData::Dumper print "Data::Dumper exists\n" if %Data::Dumper::; Data::Dumper exists
So you could do:
if (%HTML::Template::) { # HTML::template stuff } else { # Regular HTML stuff }
Keep in mind, however, there is a caveat to that: if you load HTML::Template::othermodule without loading HTML::Template, that may fail. Instead, you can do:
if (exists ${%HTML::Template::}{'import'}) { ... }
which checks for the existance of the import subroutine. import is in every package by default, and that can be used to see if it exists (and hence if a module has been loaded by that name).