1 #!./perl -IFoo::Bar -IBla
5 unshift @INC, '../lib';
6 require './test.pl'; # for which_perl() etc
13 my $Is_MacOS = $^O eq 'MacOS';
14 my $Is_VMS = $^O eq 'VMS';
17 $lib = $Is_MacOS ? ':Bla:' : 'Bla';
18 ok(grep { $_ eq $lib } @INC);
20 skip 'Double colons not allowed in dir spec', 1 if $Is_VMS;
21 $lib = $Is_MacOS ? 'Foo::Bar:' : 'Foo::Bar';
22 ok(grep { $_ eq $lib } @INC);
25 $lib = $Is_MacOS ? ':Bla2:' : 'Bla2';
26 fresh_perl_is("print grep { \$_ eq '$lib' } \@INC", $lib,
27 { switches => ['-IBla2'] }, '-I');
29 skip 'Double colons not allowed in dir spec', 1 if $Is_VMS;
30 $lib = $Is_MacOS ? 'Foo::Bar2:' : 'Foo::Bar2';
31 fresh_perl_is("print grep { \$_ eq '$lib' } \@INC", $lib,
32 { switches => ['-IFoo::Bar2'] }, '-I with colons');