in reply to Modules that differ for different Perl generations

That would seem like the way to go for XS modules too, as each generation is binary compatible with other versions of the same generation, but not with other generations.
As a basic rule, perl 5.x.y will know it's supposed to be binary compatable with 5.x.z, z < y, and will hence include the appropriate directories in @INC, if available at compile time. At least, 5.8.x does so (but I think 5.6.x as well). For instance:
perl -wle '$, = "\n"; print @INC' /home/abigail/Perl /opt/perl/lib/5.8.3/i686-linux-64int-ld /opt/perl/lib/5.8.3 /opt/perl/lib/site_perl/5.8.3/i686-linux-64int-ld /opt/perl/lib/site_perl/5.8.3 /opt/perl/lib/site_perl/5.8.2/i686-linux-64int-ld /opt/perl/lib/site_perl/5.8.2 /opt/perl/lib/site_perl/5.8.1/i686-linux-64int-ld /opt/perl/lib/site_perl/5.8.1 /opt/perl/lib/site_perl/5.8.0 /opt/perl/lib/site_perl .

Abigail

Replies are listed 'Best First'.
Re: Re: Modules that differ for different Perl generations
by Crackers2 (Parson) on Mar 25, 2004 at 15:54 UTC
    I think it's worth noting the missing
    /opt/perl/lib/site_perl/5.8.0/i686-linux-64int-ld
    directory in there.

    This bit me when moving from perl 5.6.0 to perl 5.6.1 where as in your example perl 5.6.1 was only picking up the site_perl/5.6.0 directory but not the site_perl/5.6.0/i386 one.

    Anyone know if this behaviour is intentional or just a consequence of the way perl happened to be compiled ? (I'm using standard Red Hat RPMs)

      Intentional. Due to hash randomization, 5.8.1 is not binary compatible with 5.8.0.

      Abigail