Wiggins D Anconia wrote: >> Jupiterhost.Net wrote: >> >> > >> >> Ok, well you think that might have helped to state in the first place, >> >> especially when posting to a beginners list? >> > >> > Sorry I didn't mean to offend anyone, I felt it was irrelevant to the >> > question. (IE - How do I vacuum my car instead of How would I vacuum a >> > blue car?) >> > >> >> no need to apologize, you didn't offend anyone. i read the thread and i >> agree with you that your question of how to undef a ref is irrelevant to >> how you manage a persistent process via PersistentPerl or FCGI or mPerl. >> > > I still disagree. If for no other reason than the original post would > be very confusing to the beginners who look through the archive (if such > a person exists ;-)), then ask why their variables don't persist across > separate calls to Perl. "Offend" is probably a bit harsh, but it > certainly would have been easier/faster to state "When working with > PersistentPerl, I would like to do...." because about half the time on > this list the OP is asking a question that may relate to *their* > implementation but the eventual outcome is a re-analysis of how they got > to their question to begin with. >
you have been in this list long enough and you have helped a lot more people than i had. your approach to the problme is definitely a good one but... if someone is asking: "how can i increment $i to 10 if it is currently 1?" would you be asking why? if OP then reply he got the value of $i from a DB, would you be asking what DB it is or what SQL does he use? if no, why would you want to ask why someone wants to undef something? is it so rare that we hardly need to undef something? is it so general that undef something is a bad design? [snip] >> > > But that is assuming there is only one reference to whatever $_ points > to, it has to be the *last* reference. > no it doesn't assume anything. it simply loose the ref that a var points to. why would you want to loose a ref only if it's the last ref? you mean you can't loose a ref if it's not the last ref? > > Two cases I can think of right away, where simply undef'ing the contents > of the variable that the reference points too won't work... filehandles > that have not been flushed, and objects who have a DESTROY method. Both > of these are special actions taken when a referent is garbage collected, > simply resetting its value won't take the proper precautions. > OP says nothing about how a ref should be destoried if a ref to it is loose and so i didn't say anything or assume anything either > > There is *a lot* that would need to be checked when using PersistentPerl > especially with any non-home grown modules, similar to checking for > Thread safety or concurrency issues. > right but has OP asked help on those topics? > > It would seem it is still safer to have Perl handle the garbage > collection by mangling the reference counts, possibly through contrived > scoping. Regardless, the code better be *thoroughly* tested... > right. david -- s$s*$+/<tgmecJ"ntgR"tgjvqpC"vuwL$;$;=qq$ \x24\x5f\x3d\x72\x65\x76\x65\x72\x73\x65 \x24\x5f\x3b\x73\x2f\x2e\x2f\x63\x68\x72 \x28\x6f\x72\x64\x28\x24\x26\x29\x2d\x32 \x29\x2f\x67\x65\x3b\x70\x72\x69\x6e\x74 \x22\x24\x5f\x5c\x6e\x22\x3b\x3b$;eval$; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>