Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: mod_cgid, CGI::Fast share values between different scripts?

by Anonymous Monk
on Oct 09, 2012 at 06:41 UTC ( #997932=note: print w/ replies, xml ) Need Help??


in reply to mod_cgid, CGI::Fast share values between different scripts?

You can't, if you want to share values between programs, you have to use an intermediary, some kind of ipc, some kind of database, IPC::Sharelite, DB_File, DBD::SQLite, mysql, ...


Comment on Re: mod_cgid, CGI::Fast share values between different scripts?
Replies are listed 'Best First'.
Re^2: mod_cgid, CGI::Fast share values between different scripts?
by Anonymous Monk on Oct 09, 2012 at 07:29 UTC
    thanks for the quick response. it's a pitty. such things worked a bit better with mod_perl.
    here is how it works:
    #!/usr/bin/perl use CGI::Fast; use IPC::ShareLite; my $share = IPC::ShareLite->new( -key => 0xBADC0DE, -create => 'yes', -destroy => 'no', ); while ( CGI::Fast->new() ) { print "Content-type: text/html\n\n"; my $x = $share->fetch; $x++; $share->store($x); print $x; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997932]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2015-07-29 07:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls