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

Hi, We are upgrating from perl 5.8.3 on 32bit a platform to 5.8.8 on a 64bit platform. We have some custom XS modules we have written. But I am noticing a difference in the behaviour of the -I flag.

In perl 5.8.8 running
  PERL5LIB=DIR perl -e 'print join("\n",grep(/DIR/,@INC))."\n"'
gives

DIR/x86_64-linux-thread-multi DIR

But running
  perl -IDIR -e 'print join("\n",grep(/DIR/,@INC))."\n"'
only gives
  DIR

In perl 5.8.3 both commands give the same output. i.e. The -I flag in perl 5.8.3 automatically includes the architecture specific subdirectory, but it does not in perl 5.8.8.

So is this a deliberate change in the behaviour of the -I flag (I couldn't find anything in perldelta) or is there and issue with my perl 5.8.8 setup and/or config.

Replies are listed 'Best First'.
Re: @INC -I flag and architecture dependant subdirectory
by ikegami (Patriarch) on Sep 23, 2010 at 03:28 UTC

    So is this a deliberate change in the behaviour of the -I flag

    I doubt it. -I includes the arch dir with Perl 5.12.2 (if present).

      Thanks,

      So this is not normal. It is definitely occuring for us with 64 bit perl 5.8.8 running on Red Hat EL5. I think our perl comes from the default perl rpm which comes with Red Hat. Unfortunately we are not in a position to try other versions. We do not see this issue with perl 5.10 running on Ubuntu.

      Anyway, we have discovered a workaround. While
      perl -IDIR
      does not "work" (include the arch dirs), it does "work" if we change out shell scripts to use
      perl -mlib=DIR

      Thanks again for your feedback

Re: @INC -I flag and architecture dependant subdirectory
by Anonymous Monk on Sep 23, 2010 at 03:21 UTC
    So is this a deliberate change in the behaviour of the -I flag (I couldn't find anything in perldelta) or is there and issue with my perl 5.8.8 setup and/or config. Its not a change, and there is nothing wrong.