1#!./perl -IFoo::Bar -IBla 2 3BEGIN { 4 chdir 't' if -d 't'; 5 unshift @INC, '../lib'; # Do NOT make this @INC = '../lib'; 6 require './test.pl'; # for which_perl() etc 7 plan(4); 8} 9 10my $Is_VMS = $^O eq 'VMS'; 11my $lib; 12 13$lib = 'Bla'; 14ok do { grep { $_ eq $lib } @INC[0..($#INC-1)] }, 'Identified entry in @INC'; 15SKIP: { 16 skip 'Double colons not allowed in dir spec', 1 if $Is_VMS; 17 $lib = 'Foo::Bar'; 18 ok do { grep { $_ eq $lib } @INC[0..($#INC-1)] }, 19 'Identified entry in @INC with double colons'; 20} 21 22$lib = 'Bla2'; 23fresh_perl_is("print grep { \$_ eq '$lib' } \@INC[0..(\$#INC-1)]", $lib, 24 { switches => ['-IBla2'], nolib => 1 }, '-I'); 25SKIP: { 26 skip 'Double colons not allowed in dir spec', 1 if $Is_VMS; 27 $lib = 'Foo::Bar2'; 28 fresh_perl_is("print grep { \$_ eq '$lib' } \@INC", $lib, 29 { switches => ['-IFoo::Bar2'], nolib => 1 }, '-I with colons'); 30} 31