From: Peter Rabbitson <ribasushi@cpan.org>
Date: Tue, 9 Jun 2009 22:19:48 +0000 (+0000)
Subject: AuthorCheck fixes
X-Git-Tag: v0.08106~20
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fd3d890d5b5502fde946d5d45f5639ee58a43f93;p=dbsrgits%2FDBIx-Class.git

AuthorCheck fixes
---

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;
     }