From: Juerd Waalboer Date: Sat, 31 Mar 2007 00:17:09 +0000 (+0200) Subject: use relative paths in compile-time includes X-Git-Tag: 3.16~3 X-Git-Url: http://git.shiar.net/perl/plp/.git/commitdiff_plain/a3e055f384279c0e88b1063ccc2b417c65f4df07 use relative paths in compile-time includes --- diff --git a/PLP.pm b/PLP.pm index 93ec49a..0e2a2f9 100644 --- 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;