in reply to patchable settings

4. Do #3 but factor out everything but updateNode() from that code [into putVars or packVars] so it becomes

sub setVars { my($NODE,$vars)= @_; putVars($NODE,"vars",$vars); updateNode($NODE,-1); } # or sub setVars { my($NODE,$vars)= @_; $NODE->{vars}= packVars($vars); updateNode($NODE,-1); }

Yes, I'd rather give setVars() a name that more clearly conveys that it will updateNode(), but I don't want to change every chunk of code that is already using setVars().

- tye        

Replies are listed 'Best First'.
Re^2: patchable settings (factor)
by ysth (Canon) on Sep 13, 2004 at 23:56 UTC
    Ok. I prefer your second option. Given the node cache, anytime you set a field you've already begun the process of updating and the updateNode should be close by.