X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FAuthorCheck.pm;h=1e58b93909e66d757b485e921d6fff2d7bcdb507;hb=818ec409baa3cd8a520bb6164a83e9a90fb84674;hp=4d2a6f618b84cc40988d90378bdb02e6ef4fb998;hpb=ab340f7f379ff7c39908a01e82ca337009275eb1;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest/AuthorCheck.pm b/t/lib/DBICTest/AuthorCheck.pm index 4d2a6f6..1e58b93 100644 --- a/t/lib/DBICTest/AuthorCheck.pm +++ b/t/lib/DBICTest/AuthorCheck.pm @@ -84,7 +84,7 @@ EOE sub _find_co_root { my @mod_parts = split /::/, (__PACKAGE__ . '.pm'); - my $rel_path = file (@mod_parts); + my $rel_path = join ('/', @mod_parts); # %INC stores paths with / regardless of OS return undef unless ($INC{$rel_path}); @@ -93,7 +93,7 @@ sub _find_co_root { # - do 'cd ..' as many times as necessary to get to t/lib/../.. my $root = dir ($INC{$rel_path}); - for (0 .. @mod_parts + 1) { + for (1 .. @mod_parts + 2) { $root = $root->parent; }