Hi People, I'm trying to write a modular system with mod_perl but currently i cant store data into hashes in the other modules. I can store data into the hash but if i dump it there is no change :-( $r->pnotes() would work, but i dont want to copy the whole data again and again.
Anyone can explain me why he doesnt stores the data in the hash?
Thanks in advance,
Regards,
Simon
Code:
-----
package My::Home;
use strict;
use Apache::Constants qw(:common);
use Apache::Request;
use My::Data;
use Data::Dumper;
sub handler {
my $r=shift;
$r->content_type("text/plain");
$r->send_http_header();
My::Data->init();
$My::Data::temp{foo}="bar";
print Dumper(\%My::Data::temp);
return(OK);
}
1;
package My::Data;
use strict;
use Apache::Request;
sub init {
%My::Data::temp=(
test => "123",
);
}
1;
pgp00000.pgp
Description: PGP signature
