Best way to pass arguments to an Apache2::SubProcess?
Tosh Cooey <[email protected]>
| Newsgroups | gmane.comp.apache.mod-perl |
|---|---|
| Organization | Twelve Hundred Group LLC |
| Message-ID | <[email protected]> |
So my will has crumbled, mostly because I'm probably not very good at
the "resident in memory" part of mod_perl and I will be using
Apache2::SubProcess to fire off a sub-process.
There seems to be two easy ways to send data to my detached sub-process;
via an \@args or via $r->subprocess_env->set.
I would like to pass large data structures which I will JSON encode and
I'm wondering which of the above would be best for that, if any, and
what the limitations are of either.
Also, I was wondering, in the docs for Apache2::SubProcess in the
section about properly detaching the sub-process it has in the example:
$r->spawn_proc_prog ('/path/to/detach_script.pl', $args);
Is there a reason $args is used rather than \@args as outlined earlier
in the docs?
opt arg2: \@argv ( ARRAY ref )
Or is it possible to create an $args->[0..10] and pass that?
Thanks!
Tosh
--
McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/