develooper Front page | perl.perl5.porters | Postings from March 2000

A plea for more pollution

M.J.T. Guy
March 16, 2000 08:12
A plea for more pollution
Message ID:
"Simon Cozens" <> wrote
>	Storable (sv_yes, sv_no, sv_undef undefined)
> 	Curses (na)
> 	Term::ReadLine::Gnu (na, sv_undef)

Lack of pollution strikes again.    We're going to see a lot of these.
Lots and lots and lots and lots, clogging up perlbug and c.l.p.* .

At least in the short term, we need more pollution.   And here's a
half baked idea about how we might achieve it.

MakeMaker should look at the date of the module. (What's the 'date'
of a module?   That's one of the ways in which this idea is half-baked.)

a)    If it's older than Threshhold1 (say, the release date of 5.005_03)
      we know it must have been built with old Perls, so we
      know it's pollution-resistant.    So just force POLLUTE on,
      as if POLLUTE=1 had been specified.
      (And to be polite, put out a message saying it's been done.)

b)    If it's after Threshold2 (say, the release date of 5.6.0),
      it shouldn't *need* pollution (else the author has been *very*
      lax in his testing).

c)    If it's between Threshold1 and Threshold2, it's _probably_
      pollution-resistant.   So we could either

      i)   Force POLLUTE on, and put out a message saying "If you
           suffer from name clashes, try again setting POLLUTE=0".

      ii)  Leave POLLUTE alone and put out a message saying "If this
           fails because ... undefined, try again setting POLLUTE=1".

Although it's backward rather than forward looking, I'd prefer c(i),
on the grounds that in practice most modules don't suffer name
clashes from pollution.

It's all a bit pragmatic, but perhaps that's what the P in Perl
stands for.

Mike Guy Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About