Woops -- that should have been:
In your globa.asa:
use vars qw/
$Request
$Response
$Session
$Server
$Application
/;
# Added "sub" infront of Script_OnFlush :)
sub Script_OnFlush
{
my $ref = $Response->{BinaryRef};
$$ref =~ s/<body>/<!--#include virtual='/inc/header.inc'-><body>/g;
}# end Script_OnFlush()
Regards,
John Drago
________________________________________
From: Andrew Koebrick [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 14, 2004 3:31 PM
To: '[EMAIL PROTECTED]'
Subject: regular expressions on $Response ?
Hoping somebody can offer a suggestion on how best to do my headers and
footers.� I bumped into problems getting Apache::ASP, Apache 2.0 and filters
working.� I was using mod_ext_filter to replace my <body> and </body> tags
(using a simple sed command) with a SSI directive, which in turn pulled in
complex headers and footers.�
�
When I moved to Fedora 3 this scheme started failing.� My options are to move
off of Apache::ASP for my embedded perl (perhaps to Mason), or to try to do the
replaces above in a manner more internal to Apache::ASP.
�
I have not been using the $Response->AddHeader($name, $value)� because I need
to keep the existing headers from the HTML files (they contain lots of metadata.
�
So, is there a way to do regular expressions agains the $Resoponse object?�
Something akin to (escaping ignored):
$Response =~ s/<body>/<!--#include virtual='/inc/header.inc'-><body>/g
�
I am not currently using a global.asa file, but I guess I could start if I need
to.
�
Thanks for any suggestions.
�
Andrew Koebrick
Andrew Koebrick
Web Coordinator / Librarian
Dept. of Administration
State of Minnesota
658 Cedar St.
St. Paul, MN 55155
651-296-4156
http://server.admin.state.mn.us
�
�
�
Andrew Koebrick
Web Coordinator / Librarian
Dept. of Administration
State of Minnesota
658 Cedar St.
St. Paul, MN 55155
651-296-4156
http://server.admin.state.mn.us
�
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]