Hello everyone,

I am trying to use a IPC::Shareable tied hash to cache some data at the 
start of apache from my startup.pl script.

this is my startup.pl

-------------
$ENV{GATEWAY_INTERFACE} =~ /^CGI-Perl/ or
        die "GATEWAY_INTERFACE not Perl!";

use Apache::Registry;
use Apache::DBI;
use IPC::Shareable;
use GXV::Abonados;
use strict;

my %GLOBALDATA;
my %options = (
     create    => 1,
     exclusive => 0,
     mode      => 0666,
     destroy   => 1,
);

tie %GLOBALDATA, 'IPC::Shareable', 'GLUE', { %options } ||
die "tie failed\n";

my $gxv = GXV::Abonados->new ||
die "not able to connect to GXV\n";

eval {
     %GLOBALDATA = $gxv->paquetes_shared;
};

die "Global data is not accessible: $@" if ($@);
1;
--------------


The method GXV::Abonados::paquetes_shared() works, I have tried many 
forms of recieving (and returning of course) the data (a flat scalar, 
arrays, hashes).

If I asign to *GLOBALDATA a short string or number it works, I checked 
IPC::Shareable::SHM_BUFSIZ(); and it's more than enough to hold the 
return value of $gxv->paquetes_shared;

The worst of all is that Apache simply doesnt start, and I get no error 
message at all.

Can someone please give me some insight?

TIA,

Best Regards,

Juan Jose Natera

Reply via email to