in reply to Re: can a perl script act as a daemon to serve data in its symbol table?
in thread can a perl script act as a daemon to serve data in its symbol table?

this is good.. real good, you saved me, sam-

I still want to know though .. as a sidenote.. just to know.. how would one... if i have foo.pl running and waiting on the box. how could bar.pl access foo.pl's present namespace ? can it ?

my $name = &foo.pl::main::Freaky($h1+3); # muhahhahaha
  • Comment on Re^2: can a perl script act as a daemon to serve data in its symbol table?
  • Download Code

Replies are listed 'Best First'.
Re^3: can a perl script act as a daemon to serve data in its symbol table?
by samtregar (Abbot) on Feb 02, 2006 at 23:39 UTC
    Well, sure, that's more-or-less exactly what memcached is doing. You could write memcached in Perl and call it foo.pl if you wanted. I think you might be focusing too much on Perl's namespace. Perl namespaces are just hashes, just the same as the hash that memcached supports, so all the same techniques apply.

    If you want to learn more about networking with Perl, I suggest you pick up a copy of Network Programming with Perl. I'm sure it has examples of the kind of thing you're talking about.

    -sam