package PBB::Packages::MyConfigTest; use strict; @PBB::Packages::MyConfigTest::ISA = qw(Exporter); %PBB::Packages::MyConfigTest::stash = ( "p_type" => "text/html", "p_charset" => "UTF-8", "p_theme" => "gnome-default", "css_files" => ["aa.js", "bb.js"], ); 1; #### #!/usr/bin/perl use lib qw(/path/myprj); use strict; 1; #### package PBB::ControllerTest; use vars qw($q $t); use vars qw(%stash); use Apache2::RequestIO (); use Apache2::Const -compile => ':common'; use CGI qw(); use CGI::Carp qw(fatalsToBrowser); use PBB::Packages::MyConfigTest; use Data::Dumper; use strict; *stash = \%PBB::Packages::MyConfigTest::stash; sub handler{ my $r = shift; $q = new CGI; print $q->header(); $t = {}; @{$t->{stash}}{keys %stash} = values %stash; $t->{stash}->{css_files} = [@{$t->{stash}->{css_files}}, "a.js", "b.js"]; #other code here return Apache2::Const::OK; } 1;