13 use File::Spec::Functions;
14 use File::Spec::Unix (); # need this for %INC munging
19 local $ENV{DEVEL_HIDE_VERBOSE} = 0;
20 eval { require Devel::Hide };
22 eval { require Sub::Name };
23 plan skip_all => "Devel::Hide required for this test in presence of Sub::Name"
27 Devel::Hide->import('Sub/Name.pm');
29 require Class::Accessor::Grouped;
33 # rerun the regular 3 tests under the assumption of no Sub::Name
35 for my $tname (qw/accessors.t accessors_ro.t accessors_wo.t/) {
38 share($pass) if $has_threads;
41 note "\nTesting $tname without Sub::Name (pass @{[ $pass ++ ]})\n\n";
43 my ($tfn) = catfile($Bin, $tname) =~ /(.+)/;
46 qw|AccessorGroups.pm AccessorGroups/BeenThereDoneThat.pm AccessorGroupsRO.pm AccessorGroupsSubclass.pm AccessorGroupsParent.pm AccessorGroupsWO.pm|,
47 File::Spec::Unix->catfile ($tfn),
51 if (my ($mod) = $_ =~ /(.+)\.pm$/ ) {
56 local $SIG{__WARN__} = sub { warn @_ unless $_[0] =~ /subroutine .+ redefined/i };
68 # nested threading of this sort badly blows up on 5.10.0 (fixed with 5.10.1)
69 unless ($] > 5.009 and $] < 5.010001) {
78 'Innner thread joined ok',
81 is ($todo->(), 666, "Intermediate result ok");
89 'Outer thread joined ok',
92 is ($todo->(), 666, "Unthreaded run ok") for (1,2);
96 is ($todo->(), 666, "Unthreaded run ok") for (1,2);