From acf0702e4f3bf675deeec34bfbe70928460e7cdf Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 30 Dec 2004 09:59:02 +0000 Subject: [PATCH] kludge to fix nested includes with Apache::ASP... dunno how much longer i want to support that, should just switch to Mason --- htetc/global.asa | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htetc/global.asa b/htetc/global.asa index 612f6f4af..c5f4ee099 100644 --- a/htetc/global.asa +++ b/htetc/global.asa @@ -206,9 +206,16 @@ sub sprintAutoProfile { } sub include { - ( my $file = shift ) =~ s(^/)(%%%FREESIDE_DOCUMENT_ROOT%%%/); + my $file = shift; + my $pop = 0; + if ( $file =~ m(^([^/].*)/[^/]+) ) { + push @{$Response->{asp}{includes_dir}}, "./$1"; + $pop = 1; + } + $file =~ s(^/)(%%%FREESIDE_DOCUMENT_ROOT%%%/); #broken in 5.005# ${$Response->TrapInclude($file, @_)}; my $ref = $Response->TrapInclude($file, @_); + pop @{$Response->{asp}{includes_dir}} if $pop; $$ref; } -- 2.11.0