in reply to CGI object already instantiated?

Two ideas. First, $INC{"CGI.pm"} won't be set until someone has done something like require CGI. So this might give you a false positive if someone has done require CGI and not use CGI but that seem pretty unlikely.

Second, you could check if %CGI::EXPORT is empty. It appears to me that just about any flavor of use CGI will put values into %CGI::EXPORT.

Between the two, I'd use the first one since it doesn't depend on how CGI.pm is implemented and I can't think of any reason to only require CGI.

        - tye (but my friends call me "Tye")