Gyro has asked for the wisdom of the Perl Monks concerning the following question:

Greetings Enlighten Ones,

We are trying to add the Kstat module and were told to use the following to begin with.

perl Makefile.PL POLLUTE=1

But we get the following error...

'POLLUTE' is not a known MakeMaker parameter name.

Could anyone give an idea what is happening and how to correct it? I have tried searching for an answer without success and now turn to you for support. The version of perl we are using (at this point) is 5.005_2 and 5.005_3 on Solaris 5.6 and 5.5.1. We are also using gcc version 2.95.3 20010315.

Thanks, Gyro

Replies are listed 'Best First'.
Re: POLLUTE=1 (boo)
by boo_radley (Parson) on Jan 16, 2002 at 02:26 UTC
    you say :
    The version of perl we are using (at this point) is 5.005_2 and 5.005_3 on Solaris 5.6 and 5.5.1.
    from a mailing list message :
    >  C Source Incompatibilities
    >
    >    `PERL_POLLUTE'
    >        Release 5.005 grandfathered old global symbol names by
    >        providing preprocessor macros for extension source
    >        compatibility. As of release 5.6, these preprocessor
    >        definitions are not available by default. You need to
    >        explicitly compile perl with `-DPERL_POLLUTE' to get these
    >        definitions. For extensions still using the old symbols,
    >        this option can be specified via MakeMaker:
    >
    >            perl Makefile.PL POLLUTE=1
    
    So it would seem that POLLUTE=1 is a workaround for newer perls (5.6) to get along with modules that require older perl bits (5.005). Ask whoever told you to use POLLUTE=1 (why hadn't you asked them to start with?) what version of perl they tested kstat with. It may be possible you don't need it at all.
    Update : when I say "it may be possible you don't need it at all" I meant as opposed to upgrading to a 5.6 perl. There's no reason why anyone should've guessed that, though.

      Yes, if "perl Makefile.PL" doesn't know about POLLUTE, then you don't need it.

      If one wants to write modules that work with both old and new versions of Perl, then one should fetch Devel::PPPort. Gyro may wish to inform the authors of Kstat about this. (:

              - tye (but my friends call me "Tye")
Re: POLLUTE=1
by Gyro (Monk) on Jan 16, 2002 at 04:12 UTC
    Thanks for the info!
    We are looking into contacting the author of the module, seems there are other issues to consider with this. Seems to be a version difference in the module on CPAN (0.02) and that which comes pre-installed on Solaris 2.8 (1.0). We got it to compile on one of our other boxes but doesn't work. So we are looking to upgrade our version of perl (YES!), and do some testing to see if it is us or the source at fault. Hopefully we can give you an update on what we find.
    Thanks again!!!