4 if( $ENV{PERL_CORE} ) {
6 @INC = ('../lib', 'lib');
15 # There was a bug with overloaded objects and threads.
16 # See rt.cpan.org 4218
17 eval { require threads; 'threads'->import; 1; };
23 if( !eval "require overload" ) {
24 plan skip_all => "needs overload.pm";
35 q{""} => sub { $_[0]->{string} };
39 bless { string => shift }, $class;
46 local $SIG{__WARN__} = sub { $warnings = join '', @_ };
48 # overloaded object as name
49 my $obj = Overloaded->new('foo');
52 # overloaded object which returns undef as name
53 my $undef = Overloaded->new(undef);
60 my $obj = Overloaded->new('not really todo, testing overloaded reason');
62 fail("Just checking todo as an overloaded value");
67 my $obj = Overloaded->new('not really skipped, testing overloaded reason');