package MyCGIApp; use CGI::Application::ValidateRM; use strict; use vars qw( $VERSION); $VERSION = 1.00; use base qw(CGI::Application); sub cgiapp_init { my $self = shift; ####################### package G; use Config::General; use vars qw( %CF ); %G::CF = ParseConfig("../mymodules/config.dat"); ... more stuff would be here (perhaps connecting to the DB) ... } # end MyCGIApp.pm #### #!/usr/local/bin/perl package CDNR; use base MyCGIApp; # Extending the class ... runmodes, etc, etc, ... in one of them: $t->param( 'Header' => "My Header", 'HeaderText' => "$G::CF{headertext}", );