in reply to using modules already 'used'

$q ||= new CGI;
...is also cool, but of course not strictly equal to your variant :)