Re: Persistant references [was] Persistent Net::Telnet Objects

2002-05-31 Thread Perrin Harkins
First, there is no way to effectively pass compiled code between processes at this time. It isn't likely to happen with Perl 5 because attempts at loading compiled bytecode from disk have usually had poor performance and other issues. Second, what you're proposing is probably not a good idea

Re: Persistant references [was] Persistent Net::Telnet Objects

2002-05-30 Thread Ryan Parr
] To: [EMAIL PROTECTED] Sent: Wednesday, May 29, 2002 11:16 PM Subject: Re: Persistant references [was] Persistent Net::Telnet Objects You could just pass around a string rather than a subref: my $handler = 'sub { my $arg = @_; do_something(); }'; vs my $handler = sub { my $arg

Re: Persistant references [was] Persistent Net::Telnet Objects

2002-05-29 Thread Ryan Parr
I never do give enough info on the first e-mail. Thank you for bearing with me... What I mean is, if a request comes in for a certain form I would like to be able to do something like this: my $form = load_form($r); $c{$session_id}-{handler} = $form-{handler}; # -- this being a code ref...

Re: Persistant references [was] Persistent Net::Telnet Objects

2002-05-29 Thread Garth Winter Webb
You could just pass around a string rather than a subref: my $handler = 'sub { my $arg = @_; do_something(); }'; vs my $handler = sub { my $arg = @_; do_something(); }; When you want to call it later on you do it like: eval($handler)-('foo'); vs $handler-('foo'); Garth On