Aaron Sherman wrote: > On Thu, Oct 25, 2001 at 10:42:15AM -0700, Glenn Linderman wrote: > > > So then the lexically scoped operator:+ wouldn't be able to achieve > > the goal of my suggested implicit numerification warning... the goal > > being the ability to ensure that there are no implicit numerifications, > > that all numerifications are done via a selected conversion methed. > > That's fine, though. You've already got the warning in perl5:
snip > If you want to warn on conversions even if the number looked numeric, you > could simply add another warning type (e.g. WARN_VERBOSE_NUMERIC) and > then have: > > if (SvPOKp(sv) && SvLEN(sv)) { > if (ckWARN(WARN_NUMERIC) && !SvIOKp(sv) && > (ckWARN(WARN_VERBOSE_NUMERIC) || !looks_like_number(sv))) > not_a_number(sv); > return Atof(SvPVX(sv)); > } This is the sort of thing I was suggesting, albeit with little knowledge of the internals you are showing here. And I'm not sure if that takes care of the case of only reporting the first one (under the theory that you don't need 10,000 warnings per run to help you eliminate all of the implicit conversions)... so if you write a bunch of code, turn on the warning, the idea is you are trying to make the code "clean" with respect to implicit string to numeric conversions. -- Glenn ===== Due to the current economic situation, the light at the end of the tunnel will be turned off until further notice.