3 # This file is for concatenation tests that require test.pl.
5 # t/opbasic/concat.t cannot use test.pl as
6 # it needs to avoid using concatenation in
17 # This test is in the file because overload.pm uses concatenation.
18 { package o; use overload '""' => sub { $_[0][0] } }
19 $x = bless[chr 256],o::;
24 is $x, "\xff\x{101}\x{101}", '.= is not confused by changing utf8ness';
26 # Ops should not share the same TARG between recursion levels. This may
27 # affect other ops, too, but concat seems more susceptible to this than
28 # others, since it can call itself recursively. (Where else would I put
30 fresh_perl_is <<'end', "tmp\ntmp\n", {},
39 package Path::Class::Dir;
40 use overload q[""] => sub { ::canonpath("tmp") };
43 print canonpath("tmp"), "\n";
44 print canonpath(bless {},"Path::Class::Dir"), "\n";
46 "recursive concat does not share TARGs";