Stas Bekman wrote:
Cliff Woolley wrote:

On Mon, 17 Mar 2003, Greg Ames wrote:


I have 'data' datas long 'lenght'. If I try to modify
the data I get and to send it again inside the bucket,
it doesnt work.


What kind of buckets do you have before you try to modify them?  You
can't modify some types of buckets.



You're not supposed to modify the data in ANY kind of bucket. Buckets are
write-once read-many. If you want to modify the data in a bucket, you
have to do a bucket read, copy the data into a new buffer, modify it, and
place the new buffer into a new bucket, replacing the old bucket.


Cliff, is this documented somewhere?

Do you have to read-modify-replace even if you don't modify the length of the data? e.g. lowercasing all the data in the bucket?

yes.
always.
you don't know what the backing store of the bucket is, and who else could be referecing it at the same time.
(shared mem/cache/memory mapped files are examples on where you don't won't to modify the data).



__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com





Reply via email to