Lines Matching full:inc

15 # Dedupe @INC. In a future patch we /may/ refuse to process items
18 my %seen; @INC = grep {!$seen{$_}++} @INC;
30 like $@, qr/^Can't locate $file in \@INC \(\@INC[\w ]+: \Q@INC\E\) at/,
87 $exp = "Can't locate $err_path in \@INC";
94 $exp .= " (\@INC entries checked: @INC) at";
142 like $@, qr/^Can't locate $nonfile\.ph in \@INC \(did you run h2ph\?\) \(\@INC[\w ]+: @INC\) at/;
149 …e $@, qr/^Can't locate \Q$file\E in \@INC \(change \.h to \.ph maybe\?\) \(did you run h2ph\?\) \(…
158 like $@, qr/^Can't locate \Q$file\E in \@INC \(did you run h2ph\?\) \(\@INC[\w ]+: @INC\) at/,
177 push @INC, '../lib';
191 local @INC = ".";
217 # I can't see how to test the case of not displaying @INC in the message.
243 local @INC = @INC;
246 …like $WARN, qr{^Invalid \\0 character in \@INC entry for require: lib\\0invalid at }, 'nul warning…
272 # non-searchable pathnames shouldn't mention @INC in the error
283 # success in %INC
285 push @INC, "lib";
287 local %INC = %INC; # copies \&PL_sv_undef into a new undef
295 'unshift @INC, sub { sub { 0 } }; require "asdasd";',
297 { }, '@INC hook blocks do not cause segfault');
301 # make sure that modifications to %INC during an INC hooks lifetime
306 'use lib qq(./lib); BEGIN{ unshift @INC, '
311 { }, 'Inc hooks have the correct cop_file');
314 # this can segfault or assert prior to @INC hardening.
316 'unshift @INC, sub { *INC=["a","b"] }; '
318 qr!\(\@INC[\w ]+: CODE\(0x[A-Fa-f0-9]+\) b\)!,
319 { }, 'INC hooks do not segfault when overwritten');
324 # it is the value of @INC after the require, but not the directory
327 '@INC = (sub { @INC=("a","b"); () }, "z"); '
329 qr!\(\@INC[\w ]+: CODE\(0x[A-Fa-f0-9]+\) b\)!,
330 { }, 'INC hooks that overwrite @INC continue as expected (skips a and z)');
335 '@INC = (sub { @INC=qw(a b); undef $INC }, "z"); '
337 qr!\(\@INC[\w ]+: CODE\(0x[A-Fa-f0-9]+\) a b\)!,
338 { }, 'INC hooks that overwrite @INC and undef $INC continue at start');
344 .'@INC = ("a",bless({},"CB"),"e");'
346 qr!\(\@INC[\w ]+: a CB=HASH\(0x[A-Fa-f0-9]+\) b c d e\)!,
352 '@INC = ("a",bless({},"CB"),"e");'
354 …qr!Can't locate object method "INC", nor "INCDIR" nor string overload via package "CB" in object h…
355 { }, 'Objects with no INC or INCDIR method and no overload throw an error');
360 'package CB { use overload q("") => sub { "Fnorble" };} @INC = ("a",bless({},"CB"),"e");'
362 qr!\(\@INC[\w ]+: a Fnorble e\)!,
363 { }, 'Objects with no INC or INCDIR method but with an overload are stringified');
368 … 'package CB { use overload q(0+) => sub { 12345 }, fallback=>1;} @INC = ("a",bless({},"CB"),"e");'
370 qr!\(\@INC[\w ]+: a 12345 e\)!,
371 … { }, 'Objects with no INC or INCDIR method but with an overload with fallback are stringified');
377 .'@INC = ("a",bless({},"CB"),"e");'
379 qr!\(\@INC[\w ]+: a blorg e\)!,
380 { }, 'Objects with overload and no INC or INCDIR method are stringified');
385 '@INC = ("a",bless(sub { warn "blessed sub called" },"CB"),"e");'
387 qr!blessed sub called.*\(\@INC[\w ]+: a CB=CODE\(0x[a-fA-F0-9]+\) e\)!s,
393 '@INC = ("a",bless(sub { die "blessed sub called" },"CB"),"e");'
395 qr!INC sub hook died--halting \@INC search!s,
401 'sub CB::INC { die "bad mojo" } '
402 .'@INC = ("a",bless(sub { die "blessed sub called" },"CB"),"e");'
404 qr!bad mojo.*INC method hook died--halting \@INC search!s,
410 '@INC = ("a",[bless([],"CB"),1],"e");'
412 …qr!Can't locate object method "INC", nor "INCDIR" nor string overload via package "CB" in object i…
419 .'@INC = ("a",bless(sub{"b"},"CB"),bless(sub{"c"},"CB2"),"e");'
421 qr!\(\@INC[\w ]+: a CB=CODE\(0x[a-fA-F0-9]+\) i CB2=CODE\(0x[a-fA-F0-9]+\) e\)!s,
428 .'@INC = ("a",[bless([],"CB"),"b"],"c");'
430 qr!\(\@INC[\w ]+: a ARRAY\(0x[a-fA-F0-9]+\) CB=ARRAY\(0x[a-fA-F0-9]+\) b c\)!s,