use relative paths in compile-time includes
authorJuerd Waalboer <juerd@cpan.org>
Sat, 31 Mar 2007 00:17:09 +0000 (02:17 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 31 Mar 2007 00:17:09 +0000 (02:17 +0200)
PLP.pm

diff --git a/PLP.pm b/PLP.pm
index 93ec49a2ac4de121d27a34c77209efa70029385f..0e2a2f9cd1437010b05e08f6571ba999e1d496a4 100644 (file)
--- a/PLP.pm
+++ b/PLP.pm
@@ -120,7 +120,7 @@ sub sendheaders () {
                    $inB = 0;
                    $source .= "; print q\cQ";
                } elsif ($part =~ /^<\((.*?)\)>\z/ and not $inA || $inB) {
-                   my $ipath = File::Spec->rel2abs($1);
+                   my $ipath = File::Spec->rel2abs($1, File::Basename::dirname($path));
                    $source .= source($1, $level + 1, undef, $ipath) .
                               qq/\cQ, \n#line $linenr "$file"\nq\cQ/;
                    push @{ $cached{$path}[0] }, $ipath;