fixes for Win32
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / Base.pm
index 39431fa..4786c84 100644 (file)
@@ -173,11 +173,11 @@ Set this to C<0> to turn off all POD generation.
 
 =head2 pod_comment_mode
 
-Controls where table comments appear in the generated POD. By default table
-comments are appended to the C<NAME> section of the documentation. You can
-force a C<DESCRIPTION> section to be generated with the comment instead, or
-choose the length threshold at which the comment is forced into the
-description.
+Controls where table comments appear in the generated POD. Smaller table
+comments are appended to the C<NAME> section of the documentation, and larger
+ones are inserted into C<DESCRIPTION> instead. You can force a C<DESCRIPTION>
+section to be generated with the comment always, only use C<NAME>, or choose
+the length threshold at which the comment is forced into the description.
 
 =over 4
 
@@ -602,8 +602,9 @@ sub _find_file_in_inc {
     foreach my $prefix (@INC) {
         my $fullpath = File::Spec->catfile($prefix, $file);
         return $fullpath if -f $fullpath
-            and Cwd::abs_path($fullpath) ne
-               (Cwd::abs_path(File::Spec->catfile($self->dump_directory, $file)) || '');
+            # abs_path throws on Windows for nonexistant files
+            and eval { Cwd::abs_path($fullpath) } ne
+               (eval { Cwd::abs_path(File::Spec->catfile($self->dump_directory, $file)) } || '');
     }
 
     return;