# from Ken Williams # on Tuesday 08 August 2006 08:44 pm: >Hey, look at all that blib/ stuff! And all that t/lib stuff! That test should fail anywhere though, since it puts a non-existent directory on @INC and expects to get it back. On Debian Sarge, I'm getting: # Failed test in t/ext.t at line 100. # '/usr/bin/perl -le print for @INC # t/lib # /usr/local/code/hop_svk/Module-Build/blib/lib # /usr/local/code/hop_svk/Module-Build/blib/arch # inc # lib # /home/ewilhelm/.active_test_perl_libs # /usr/local/perl_lib/active/5.8.4 # /usr/local/perl_lib/active/5.8.3 # /usr/local/perl_lib/active/5.8.4 # /usr/local/perl_lib/active/5.8.3 # /usr/local/perl_lib/active # t/bundled # /etc/perl # /usr/local/lib/perl/5.8.4 # /usr/local/share/perl/5.8.4 # /usr/lib/perl5 # /usr/share/perl5 # /usr/lib/perl/5.8 # /usr/share/perl/5.8 # /usr/local/lib/site_perl # /usr/local/lib/perl/5.8.3 # /usr/local/share/perl/5.8.3 >I bet your $Config{inc_version_list} is longer than mine; what's the >output of: > > perl -V:inc_version_list inc_version_list='5.8.3 5.8.2 5.8.1 5.8.0'; >for you? Mine is: > > inc_version_list=' '; >the S_incpush() function in perl.c arranges to have all those other >suffixes added too. It looks to me like it's *trying* not to add >nonexistent directories, but I guess it's failing. Works fine on debian. No 5.*.* dir, no problem. $ mkdir /tmp/foo/5.8.4 -p $ perl -I/tmp/foo/ -le 'print for grep /foo/, @INC' /tmp/foo//5.8.4 /tmp/foo/ $ perl -I/bah/ -le 'print for grep /bah/, @INC' /bah/ Anybody got a diff of the fedora source to perl.c handy? >So, I guess what this means is that we need to find a way to add only > specific directories to @INC without triggering the extra added > directories. If what we're seeing is a problem with a snippet of redhat resmartificated code, it might be tricky. > I'm not sure if a good way exists, short of stuffing > them all into a 'push @INC, q{...}' on the command line. > >Any other bright ideas out there? Is this theory sound? We should certainly find a way to pass non-existent directories while still removing ridiculous ones. if(-e "/etc/redhat-release") { @INC = grep({-d $_ ? 1 : ! m/\/5\.\d\.\d$/} @INC); } --Eric -- But you can never get 3n from n, ever, and if you think you can, please email me the stock ticker of your company so I can short it. --Joel Spolsky --------------------------------------------------- http://scratchcomputing.com ---------------------------------------------------Thread Previous | Thread Next