use Site::CGI; # instead of use CGI; my $query = Site::CGI->new; # . . . print $query->my_sub; # etc