perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: Apache::Util::size_string issues
Date Tue, 29 Jan 2002 05:40:39 GMT
Doug MacEachern wrote:

> On Tue, 29 Jan 2002, Stas Bekman wrote:
>>like this?
> yeah, but i'm not sure it's worth it for such a small string.  in fact, i
> think it is a loss, see comment in sv.c:
> 	/*
> 	 * Check to see if we can just swipe the string.  If so, it's a
> 	 * possible small lose on short strings, but a big win on long ones.
> 	 * It might even be a win on short strings if SvPVX(dstr)
> 	 * has to be allocated and SvPVX(sstr) has to be freed.
> 	 */
> probably best to stick with your original.


>>>>Also apr_strfsize is in the APR::Strings module in the map file. Should 
>>>>we have APR::Strings::strfsize instead of Apache__Util_size_string.
> that is probably the right place.  but Apache::String::format_size has a
> better ring to it.  either that or just group it with APR::Util (as
> APR::Util::strfsize), where the current APR::Lib functions are supposed to
> move to.

Since we have a potentially growing number of Util functions, may be 
it's better not to throw all the functions into one namespace? So in 
this case we could make something like Apache::StringUtil or 

Because if for example you look at APR::Table, it's a util too.

In any case I'll go with Apache::Util::format_size and later we can 
change it. Sounds OK?

Apache::Util::size_string as a wrapper.

Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker      mod_perl Guide

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message