2 # $Id: /mirror/googlecode/test-more/t/overload_threads.t 57943 2008-08-18T02:09:22.275428Z brooklyn.kid51 $
5 if( $ENV{PERL_CORE} ) {
7 @INC = ('../lib', 'lib');
10 unshift @INC, 't/lib';
16 # There was a bug with overloaded objects and threads.
17 # See rt.cpan.org 4218
18 eval { require threads; 'threads'->import; 1; };
24 if( !eval "require overload" ) {
25 plan skip_all => "needs overload.pm";
36 q{""} => sub { $_[0]->{string} };
40 bless { string => shift }, $class;
47 local $SIG{__WARN__} = sub { $warnings = join '', @_ };
49 # overloaded object as name
50 my $obj = Overloaded->new('foo');
53 # overloaded object which returns undef as name
54 my $undef = Overloaded->new(undef);
61 my $obj = Overloaded->new('not really todo, testing overloaded reason');
63 fail("Just checking todo as an overloaded value");
68 my $obj = Overloaded->new('not really skipped, testing overloaded reason');