Hi guys, Let me first say I'm no expert, but I bumble well. I have a redhat 7.3 box that I compiled apache(1.3.26) and mod_perl(1.27) into some time ago.
I today downloaded and installed Apache::ASP via the CPAN method that is documented on the web page. The quick start area of the install page says to `cp -rpd ./site $DOCUMENT_ROOT/asp` however I could not find any such directory. i.e. `find /usr -type d -name site -print` didn't return anything. Nor did `find /root/.cpan -type d -name site -print` Okay, so I went to http://www.apache-asp.org/eg/index.html and did a wget for each link found there (some were followed and then wget'd). The problem is I can't seem to get the tests to run. One of the error outputs is attached. What it looks like to me is it tries to compile global.asa and has a problem with line 2, which contains "use DemoASP;" I can't fine that file, nor DemoASP.pm, anyplace. Can anybody give me a clue, or if it's just as simple as a missing file, the URL of the missing file? Thanks in advance Brad -- "Nearly all men can stand adversity, but if you want to test a man's character, give him power." Abraham Lincoln Bradley W. Olin http://www.bwo1.com
<tt> <b><u>Errors Output</u></b> <ol> <li> errors compiling global.asa: Can't locate DemoASP.pm in @INC (@INC contains: /home/www/html/asp/eg//. /usr/lib/perl5/site_perl/5.6.0/ /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl . /usr/local/apache/ /usr/local/apache/lib/perl) at /home/www/html/asp/eg//./global.asa <a href=#%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%202>line 2</a>. Apache::ASP::Demo::BEGIN() called at DemoASP.pm line 2 require 0 called at DemoASP.pm line 2 eval ' #line 1 /home/www/html/asp/eg//./global.asa package Apache::ASP::Demo; ;; use strict ;; use vars qw($Application $Session $Response $Server $Request); ;; use lib qw(/home/www/html/asp/eg//.); ;; use DemoASP; # import basename() into global.asa namespace use File::Basename qw(basename); # when PerlSetVar UseStrict setting on, need to declare # global variables with "use vars" use vars qw($FontFace $GlobalFont %EG $title); # static read only global $GlobalFont = \'face=verdana,helvetica\'; # this is run every request for all scripts that share this global.asa sub Script_OnStart { $Response->Debug("Script_OnStart $0 in global.asa"); $Session->{Started}++; $title = \'\'; } sub Script_OnEnd { $Response->Debug("Script_OnEnd $0 in global.asa"); $Session->{Ended}++; } # modify data on the way out sub Script_OnFlush { if($Response->{ContentType} eq \'text/html\') { my $data = $Response->{BinaryRef}; $$data =~ s/(\\<(body|td).*?\\>)/$1\\<font $GlobalFont\\>/isg; } my $data = $Response->{BinaryRef}; $Response->Debug("Script_OnFlush: about to flush ".length($$data)." bytes to client"); } sub Session_OnStart { $Session->{Count} = 10; $Session->{onstart} = time(); $Application->{\'Session\'.$Session->SessionID} = \'?\'; $Response->AppendToLog("Session_OnStart! in ./eg/global.asa ". $Session->SessionID); } sub Session_OnEnd { my $t_session_active = time() - $Session->{onstart}; $Application->{\'Session\'.$Session->SessionID} = $t_session_active; $Response->AppendToLog("Session_OnEnd! in ./eg/global.asa ". $Session->SessionID); } sub Application_OnStart { $Response->AppendToLog("Application_OnStart! in ./eg/global.asa"); $Application->{Count} = 20; } sub Application_OnEnd { $Response->AppendToLog("Application_OnEnd! in ./eg/global.asa"); } # you can share globals between scripts as of v.10, as all scripts, including # the global.asa are compiled into the same module %EG = ( \'.htaccess\' => \'Configuration parameters that make Apache::ASP tick.\', \'application.asp\' => \'Uses $Application for incrementing a counter.\', \'binary_write.htm\' => \'$Response->BinaryWrite() demo for an asp script serving a gif.\', \'cgi.htm\' => \'Shows compatibility with the CGI.pm library\', \'counting.htm\' => \'Simple asp syntax shown by wrapping a for loop around html and inserting a \'. \'scalar value.\', \'dynamic_includes.htm\' => \'Shows an included file called as a subroutine.\', \'error_document.htm\' => \'Shows a custom error message using the $Response->ErrorDocument() API extension\', \'filter.filter\' => "Demonstrates Apache::ASP\'s ability to act both as a source and destination filter with Apache::Filter.", \'file_upload.asp\' => \'File upload data can be read from the $Request->Form(), \'. \'and is implemented via CGI.pm\', \'footer.inc\' => \'Footer include for most of the scripts listed.\', \'form.asp\' => \'Shows simple use of $Request->Form() and how to get raw input data \'. \' from $Request->BinaryRead()\', \'formfill.asp\' => \'Shows use of FormFill feature, which auto fills HTML forms from \'. \'$Request->Form() data. One must install HTML::FillInForm to use this feature. \', \'global.asa\' => \'The global.asa is the nervous system of an ASP application and \'. \'is where you define your event handlers.\', \'global_asa_demo.asp\' => \'Shows how the global.asa can be used to track users in an \'. \'application\', \'header.inc\' => \'Header include for most of the scripts listed here.\', \'include.htm\' => \'Shows how you can decompose a script into common included files\', # \'ordered_collections.ixhtm\' => # \'Used with Tie::IxHash, shows the natural ordering of the $Request->Form() collection \'. # \'by how the browser submitted the data, useful for some.\', \'register_cleanup.asp\' => \'Demonstrates use of the API extension $Server->RegisterCleanup(). \'. \'Execute code after a response completes in a fail safe way with this routine. \', \'response.asp\' => \'Messy script showing much of the $Response object\\\'s functionality, \'. \'including cookies and buffering.\', \'row.inc\' => \'File dynamically included in the dynamic_includes.htm example\', \'server.htm\' => \'Shows much of the $Server object\\\'s functionality\', \'server_variables.htm\' => \'$Response->ServerVariables() are the equivalent of %ENV in ASP\', \'session.asp\' => \'Shows use of the $Session object, and also demos one implementation \'. \'of cookieless sessions.\', \'session_query_parse.asp\' => "Demonstrates automatic cookieless session support with the SessionQueryParse* ". "settings.", \'source.asp\' => \'Handy source code viewer used to let you easily view the source of \'. \'the other asp scripts.\', \'ssi_filter.ssi\' => \'Shows full SSI in action via Apache::Filter & Apache::SSI. You must compile \'. \'your apache with stacked handlers and install these modules to see \'. \' this script\', \'syntax_error.asp\' => \'Demonstrates asp debugging with Debug 2 by creating a perl syntax error \', \'table.inc\' => \'Another include used to demo dynamic_includes.htm\', \'test.gif\' => \'Source gif for the binary_write.htm example\', \'transfer.htm\' => \'$Server->Transfer() use in action, for speedy redirect type behavior.\', \'xml_subs.asp\' => \'XMLSubsMatch XML Extensions demonstrated, which all custom tags \'. \'to be created by the developer.\', \'xml_subs_strict.asp\' => \'XMLSubsStrict setting causes XMLSubs to accept only string literals \'. \'for arguments, conforming to XML standard more strictly, and \'. \'controlling XMLSubs execution to compile time arguments.\', \'xslt.xml\' => \'XSLT transformation of XML script, using XML::XSLT, and a DBM based cache with the XSLTCache setting. Also possible for the XSLTParser setting is XML::Sablotron for faster XSLT rendering.\', ); $SIG{__DIE__} = \\&Carp::confess; # note if you include XMLSubs in the global.asa, make sure to # switch the package context to the XMLSubs namespace to avoid # any odd variable scoping problems package my; sub my::include { my($args, $text) = @_; # reference the $Response object in the package namespace # since we are in the my:: package and not the GlobalPackage/global.asa $main::Response->Include($args->{src}, title => $args->{title}); } sub my::ttb { my($args, $text) = @_; print "<font face=courier size=-1><b>$text</b></font>"; } sub my::table { my($args, $text) = @_; my $title = delete $args->{title}; my %args = ( # set defaults, and override with %$args border => 0, bgcolor => \'white\', width => \'300\', cellpadding => 3, cellspacing => 0, %$args ); print \'<table \'.join(\' \', map { "$_=$args{$_}" } keys %args, ). \'>\'; print ($title ? "<tr><td bgcolor=black><font color=white>$title</font></td></tr>" : \'\'); print "\\n"; print "<tr><td>"; print $text; print "</td></tr></table>"; } ;; sub exit { $main::Response->End(); } ;; no lib qw(/home/www/html/asp/eg//.); ;; 1;' called at /usr/lib/perl5/site_perl/5.6.0/Apache/ASP/GlobalASA.pm line 122 Apache::ASP::GlobalASA::new('Apache::ASP=HASH(0x84bd968)') called at /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 366 Apache::ASP::new('Apache::ASP', 'Apache=SCALAR(0x83522dc)', '/home/www/html/asp/eg/global_asa_demo.asp') called at /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 169 Apache::ASP::handler('Apache=SCALAR(0x83522dc)') called at DemoASP.pm line 2 require 0 called at DemoASP.pm line 2 BEGIN failed--compilation aborted at /home/www/html/asp/eg//./global.asa line 2. eval ' #line 1 /home/www/html/asp/eg//./global.asa package Apache::ASP::Demo; ;; use strict ;; use vars qw($Application $Session $Response $Server $Request); ;; use lib qw(/home/www/html/asp/eg//.); ;; use DemoASP; # import basename() into global.asa namespace use File::Basename qw(basename); # when PerlSetVar UseStrict setting on, need to declare # global variables with "use vars" use vars qw($FontFace $GlobalFont %EG $title); # static read only global $GlobalFont = \'face=verdana,helvetica\'; # this is run every request for all scripts that share this global.asa sub Script_OnStart { $Response->Debug("Script_OnStart $0 in global.asa"); $Session->{Started}++; $title = \'\'; } sub Script_OnEnd { $Response->Debug("Script_OnEnd $0 in global.asa"); $Session->{Ended}++; } # modify data on the way out sub Script_OnFlush { if($Response->{ContentType} eq \'text/html\') { my $data = $Response->{BinaryRef}; $$data =~ s/(\\<(body|td).*?\\>)/$1\\<font $GlobalFont\\>/isg; } my $data = $Response->{BinaryRef}; $Response->Debug("Script_OnFlush: about to flush ".length($$data)." bytes to client"); } sub Session_OnStart { $Session->{Count} = 10; $Session->{onstart} = time(); $Application->{\'Session\'.$Session->SessionID} = \'?\'; $Response->AppendToLog("Session_OnStart! in ./eg/global.asa ". $Session->SessionID); } sub Session_OnEnd { my $t_session_active = time() - $Session->{onstart}; $Application->{\'Session\'.$Session->SessionID} = $t_session_active; $Response->AppendToLog("Session_OnEnd! in ./eg/global.asa ". $Session->SessionID); } sub Application_OnStart { $Response->AppendToLog("Application_OnStart! in ./eg/global.asa"); $Application->{Count} = 20; } sub Application_OnEnd { $Response->AppendToLog("Application_OnEnd! in ./eg/global.asa"); } # you can share globals between scripts as of v.10, as all scripts, including # the global.asa are compiled into the same module %EG = ( \'.htaccess\' => \'Configuration parameters that make Apache::ASP tick.\', \'application.asp\' => \'Uses $Application for incrementing a counter.\', \'binary_write.htm\' => \'$Response->BinaryWrite() demo for an asp script serving a gif.\', \'cgi.htm\' => \'Shows compatibility with the CGI.pm library\', \'counting.htm\' => \'Simple asp syntax shown by wrapping a for loop around html and inserting a \'. \'scalar value.\', \'dynamic_includes.htm\' => \'Shows an included file called as a subroutine.\', \'error_document.htm\' => \'Shows a custom error message using the $Response->ErrorDocument() API extension\', \'filter.filter\' => "Demonstrates Apache::ASP\'s ability to act both as a source and destination filter with Apache::Filter.", \'file_upload.asp\' => \'File upload data can be read from the $Request->Form(), \'. \'and is implemented via CGI.pm\', \'footer.inc\' => \'Footer include for most of the scripts listed.\', \'form.asp\' => \'Shows simple use of $Request->Form() and how to get raw input data \'. \' from $Request->BinaryRead()\', \'formfill.asp\' => \'Shows use of FormFill feature, which auto fills HTML forms from \'. \'$Request->Form() data. One must install HTML::FillInForm to use this feature. \', \'global.asa\' => \'The global.asa is the nervous system of an ASP application and \'. \'is where you define your event handlers.\', \'global_asa_demo.asp\' => \'Shows how the global.asa can be used to track users in an \'. \'application\', \'header.inc\' => \'Header include for most of the scripts listed here.\', \'include.htm\' => \'Shows how you can decompose a script into common included files\', # \'ordered_collections.ixhtm\' => # \'Used with Tie::IxHash, shows the natural ordering of the $Request->Form() collection \'. # \'by how the browser submitted the data, useful for some.\', \'register_cleanup.asp\' => \'Demonstrates use of the API extension $Server->RegisterCleanup(). \'. \'Execute code after a response completes in a fail safe way with this routine. \', \'response.asp\' => \'Messy script showing much of the $Response object\\\'s functionality, \'. \'including cookies and buffering.\', \'row.inc\' => \'File dynamically included in the dynamic_includes.htm example\', \'server.htm\' => \'Shows much of the $Server object\\\'s functionality\', \'server_variables.htm\' => \'$Response->ServerVariables() are the equivalent of %ENV in ASP\', \'session.asp\' => \'Shows use of the $Session object, and also demos one implementation \'. \'of cookieless sessions.\', \'session_query_parse.asp\' => "Demonstrates automatic cookieless session support with the SessionQueryParse* ". "settings.", \'source.asp\' => \'Handy source code viewer used to let you easily view the source of \'. \'the other asp scripts.\', \'ssi_filter.ssi\' => \'Shows full SSI in action via Apache::Filter & Apache::SSI. You must compile \'. \'your apache with stacked handlers and install these modules to see \'. \' this script\', \'syntax_error.asp\' => \'Demonstrates asp debugging with Debug 2 by creating a perl syntax error \', \'table.inc\' => \'Another include used to demo dynamic_includes.htm\', \'test.gif\' => \'Source gif for the binary_write.htm example\', \'transfer.htm\' => \'$Server->Transfer() use in action, for speedy redirect type behavior.\', \'xml_subs.asp\' => \'XMLSubsMatch XML Extensions demonstrated, which all custom tags \'. \'to be created by the developer.\', \'xml_subs_strict.asp\' => \'XMLSubsStrict setting causes XMLSubs to accept only string literals \'. \'for arguments, conforming to XML standard more strictly, and \'. \'controlling XMLSubs execution to compile time arguments.\', \'xslt.xml\' => \'XSLT transformation of XML script, using XML::XSLT, and a DBM based cache with the XSLTCache setting. Also possible for the XSLTParser setting is XML::Sablotron for faster XSLT rendering.\', ); $SIG{__DIE__} = \\&Carp::confess; # note if you include XMLSubs in the global.asa, make sure to # switch the package context to the XMLSubs namespace to avoid # any odd variable scoping problems package my; sub my::include { my($args, $text) = @_; # reference the $Response object in the package namespace # since we are in the my:: package and not the GlobalPackage/global.asa $main::Response->Include($args->{src}, title => $args->{title}); } sub my::ttb { my($args, $text) = @_; print "<font face=courier size=-1><b>$text</b></font>"; } sub my::table { my($args, $text) = @_; my $title = delete $args->{title}; my %args = ( # set defaults, and override with %$args border => 0, bgcolor => \'white\', width => \'300\', cellpadding => 3, cellspacing => 0, %$args ); print \'<table \'.join(\' \', map { "$_=$args{$_}" } keys %args, ). \'>\'; print ($title ? "<tr><td bgcolor=black><font color=white>$title</font></td></tr>" : \'\'); print "\\n"; print "<tr><td>"; print $text; print "</td></tr></table>"; } ;; sub exit { $main::Response->End(); } ;; no lib qw(/home/www/html/asp/eg//.); ;; 1;' called at /usr/lib/perl5/site_perl/5.6.0/Apache/ASP/GlobalASA.pm line 122 Apache::ASP::GlobalASA::new('Apache::ASP=HASH(0x84bd968)') called at /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 366 Apache::ASP::new('Apache::ASP', 'Apache=SCALAR(0x83522dc)', '/home/www/html/asp/eg/global_asa_demo.asp') called at /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 169 Apache::ASP::handler('Apache=SCALAR(0x83522dc)') called at /home/www/html/asp/eg//./global.asa line 2 require 0 called at /home/www/html/asp/eg//./global.asa line 2 , /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 1686 </ol> <b><u>Debug Output</u></b> <ol> <li> RUN ASP (v2.53) for /home/www/html/asp/eg/global_asa_demo.asp <li> call srand() post fork <li> GlobalASA package Apache::ASP::Demo <li> global.asa was not cached for __ASP__home_www_html_asp_eg__xxApache::ASP::Demo <li> compiling global.asa Apache::ASP::Demo __ASP__home_www_html_asp_eg__xxApache::ASP::Demo exists 1 - asp: Apache::ASP=HASH(0x84bd968); compiled: HASH(0x84bd7c4); exists: 1; package: Apache::ASP::Demo; - --- - exists: 0; mtime: 0; <li> errors compiling global.asa: Can't locate DemoASP.pm in @INC (@INC contains: /home/www/html/asp/eg//. /usr/lib/perl5/site_perl/5.6.0/ /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl . /usr/local/apache/ /usr/local/apache/lib/perl) at /home/www/html/asp/eg//./global.asa line 2. Apache::ASP::Demo::BEGIN() called at DemoASP.pm line 2 require 0 called at DemoASP.pm line 2 eval ' #line 1 /home/www/html/asp/eg//./global.asa package Apache::ASP::Demo; ;; use strict ;; use vars qw($Application $Session $Response $Server $Request); ;; use lib qw(/home/www/html/asp/eg//.); ;; use DemoASP; # import basename() into global.asa namespace use File::Basename qw(basename); # when PerlSetVar UseStrict setting on, need to declare # global variables with "use vars" use vars qw($FontFace $GlobalFont %EG $title); # static read only global $GlobalFont = \'face=verdana,helvetica\'; # this is run every request for all scripts that share this global.asa sub Script_OnStart { $Response->Debug("Script_OnStart $0 in global.asa"); $Session->{Started}++; $title = \'\'; } sub Script_OnEnd { $Response->Debug("Script_OnEnd $0 in global.asa"); $Session->{Ended}++; } # modify data on the way out sub Script_OnFlush { if($Response->{ContentType} eq \'text/html\') { my $data = $Response->{BinaryRef}; $$data =~ s/(\\<(body|td).*?\\>)/$1\\<font $GlobalFont\\>/isg; } my $data = $Response->{BinaryRef}; $Response->Debug("Script_OnFlush: about to flush ".length($$data)." bytes to client"); } sub Session_OnStart { $Session->{Count} = 10; $Session->{onstart} = time(); $Application->{\'Session\'.$Session->SessionID} = \'?\'; $Response->AppendToLog("Session_OnStart! in ./eg/global.asa ". $Session->SessionID); } sub Session_OnEnd { my $t_session_active = time() - $Session->{onstart}; $Application->{\'Session\'.$Session->SessionID} = $t_session_active; $Response->AppendToLog("Session_OnEnd! in ./eg/global.asa ". $Session->SessionID); } sub Application_OnStart { $Response->AppendToLog("Application_OnStart! in ./eg/global.asa"); $Application->{Count} = 20; } sub Application_OnEnd { $Response->AppendToLog("Application_OnEnd! in ./eg/global.asa"); } # you can share globals between scripts as of v.10, as all scripts, including # the global.asa are compiled into the same module %EG = ( \'.htaccess\' => \'Configuration parameters that make Apache::ASP tick.\', \'application.asp\' => \'Uses $Application for incrementing a counter.\', \'binary_write.htm\' => \'$Response->BinaryWrite() demo for an asp script serving a gif.\', \'cgi.htm\' => \'Shows compatibility with the CGI.pm library\', \'counting.htm\' => \'Simple asp syntax shown by wrapping a for loop around html and inserting a \'. \'scalar value.\', \'dynamic_includes.htm\' => \'Shows an included file called as a subroutine.\', \'error_document.htm\' => \'Shows a custom error message using the $Response->ErrorDocument() API extension\', \'filter.filter\' => "Demonstrates Apache::ASP\'s ability to act both as a source and destination filter with Apache::Filter.", \'file_upload.asp\' => \'File upload data can be read from the $Request->Form(), \'. \'and is implemented via CGI.pm\', \'footer.inc\' => \'Footer include for most of the scripts listed.\', \'form.asp\' => \'Shows simple use of $Request->Form() and how to get raw input data \'. \' from $Request->BinaryRead()\', \'formfill.asp\' => \'Shows use of FormFill feature, which auto fills HTML forms from \'. \'$Request->Form() data. One must install HTML::FillInForm to use this feature. \', \'global.asa\' => \'The global.asa is the nervous system of an ASP application and \'. \'is where you define your event handlers.\', \'global_asa_demo.asp\' => \'Shows how the global.asa can be used to track users in an \'. \'application\', \'header.inc\' => \'Header include for most of the scripts listed here.\', \'include.htm\' => \'Shows how you can decompose a script into common included files\', # \'ordered_collections.ixhtm\' => # \'Used with Tie::IxHash, shows the natural ordering of the $Request->Form() collection \'. # \'by how the browser submitted the data, useful for some.\', \'register_cleanup.asp\' => \'Demonstrates use of the API extension $Server->RegisterCleanup(). \'. \'Execute code after a response completes in a fail safe way with this routine. \', \'response.asp\' => \'Messy script showing much of the $Response object\\\'s functionality, \'. \'including cookies and buffering.\', \'row.inc\' => \'File dynamically included in the dynamic_includes.htm example\', \'server.htm\' => \'Shows much of the $Server object\\\'s functionality\', \'server_variables.htm\' => \'$Response->ServerVariables() are the equivalent of %ENV in ASP\', \'session.asp\' => \'Shows use of the $Session object, and also demos one implementation \'. \'of cookieless sessions.\', \'session_query_parse.asp\' => "Demonstrates automatic cookieless session support with the SessionQueryParse* ". "settings.", \'source.asp\' => \'Handy source code viewer used to let you easily view the source of \'. \'the other asp scripts.\', \'ssi_filter.ssi\' => \'Shows full SSI in action via Apache::Filter & Apache::SSI. You must compile \'. \'your apache with stacked handlers and install these modules to see \'. \' this script\', \'syntax_error.asp\' => \'Demonstrates asp debugging with Debug 2 by creating a perl syntax error \', \'table.inc\' => \'Another include used to demo dynamic_includes.htm\', \'test.gif\' => \'Source gif for the binary_write.htm example\', \'transfer.htm\' => \'$Server->Transfer() use in action, for speedy redirect type behavior.\', \'xml_subs.asp\' => \'XMLSubsMatch XML Extensions demonstrated, which all custom tags \'. \'to be created by the developer.\', \'xml_subs_strict.asp\' => \'XMLSubsStrict setting causes XMLSubs to accept only string literals \'. \'for arguments, conforming to XML standard more strictly, and \'. \'controlling XMLSubs execution to compile time arguments.\', \'xslt.xml\' => \'XSLT transformation of XML script, using XML::XSLT, and a DBM based cache with the XSLTCache setting. Also possible for the XSLTParser setting is XML::Sablotron for faster XSLT rendering.\', ); $SIG{__DIE__} = \\&Carp::confess; # note if you include XMLSubs in the global.asa, make sure to # switch the package context to the XMLSubs namespace to avoid # any odd variable scoping problems package my; sub my::include { my($args, $text) = @_; # reference the $Response object in the package namespace # since we are in the my:: package and not the GlobalPackage/global.asa $main::Response->Include($args->{src}, title => $args->{title}); } sub my::ttb { my($args, $text) = @_; print "<font face=courier size=-1><b>$text</b></font>"; } sub my::table { my($args, $text) = @_; my $title = delete $args->{title}; my %args = ( # set defaults, and override with %$args border => 0, bgcolor => \'white\', width => \'300\', cellpadding => 3, cellspacing => 0, %$args ); print \'<table \'.join(\' \', map { "$_=$args{$_}" } keys %args, ). \'>\'; print ($title ? "<tr><td bgcolor=black><font color=white>$title</font></td></tr>" : \'\'); print "\\n"; print "<tr><td>"; print $text; print "</td></tr></table>"; } ;; sub exit { $main::Response->End(); } ;; no lib qw(/home/www/html/asp/eg//.); ;; 1;' called at /usr/lib/perl5/site_perl/5.6.0/Apache/ASP/GlobalASA.pm line 122 Apache::ASP::GlobalASA::new('Apache::ASP=HASH(0x84bd968)') called at /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 366 Apache::ASP::new('Apache::ASP', 'Apache=SCALAR(0x83522dc)', '/home/www/html/asp/eg/global_asa_demo.asp') called at /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 169 Apache::ASP::handler('Apache=SCALAR(0x83522dc)') called at DemoASP.pm line 2 require 0 called at DemoASP.pm line 2 BEGIN failed--compilation aborted at /home/www/html/asp/eg//./global.asa line 2. eval ' #line 1 /home/www/html/asp/eg//./global.asa package Apache::ASP::Demo; ;; use strict ;; use vars qw($Application $Session $Response $Server $Request); ;; use lib qw(/home/www/html/asp/eg//.); ;; use DemoASP; # import basename() into global.asa namespace use File::Basename qw(basename); # when PerlSetVar UseStrict setting on, need to declare # global variables with "use vars" use vars qw($FontFace $GlobalFont %EG $title); # static read only global $GlobalFont = \'face=verdana,helvetica\'; # this is run every request for all scripts that share this global.asa sub Script_OnStart { $Response->Debug("Script_OnStart $0 in global.asa"); $Session->{Started}++; $title = \'\'; } sub Script_OnEnd { $Response->Debug("Script_OnEnd $0 in global.asa"); $Session->{Ended}++; } # modify data on the way out sub Script_OnFlush { if($Response->{ContentType} eq \'text/html\') { my $data = $Response->{BinaryRef}; $$data =~ s/(\\<(body|td).*?\\>)/$1\\<font $GlobalFont\\>/isg; } my $data = $Response->{BinaryRef}; $Response->Debug("Script_OnFlush: about to flush ".length($$data)." bytes to client"); } sub Session_OnStart { $Session->{Count} = 10; $Session->{onstart} = time(); $Application->{\'Session\'.$Session->SessionID} = \'?\'; $Response->AppendToLog("Session_OnStart! in ./eg/global.asa ". $Session->SessionID); } sub Session_OnEnd { my $t_session_active = time() - $Session->{onstart}; $Application->{\'Session\'.$Session->SessionID} = $t_session_active; $Response->AppendToLog("Session_OnEnd! in ./eg/global.asa ". $Session->SessionID); } sub Application_OnStart { $Response->AppendToLog("Application_OnStart! in ./eg/global.asa"); $Application->{Count} = 20; } sub Application_OnEnd { $Response->AppendToLog("Application_OnEnd! in ./eg/global.asa"); } # you can share globals between scripts as of v.10, as all scripts, including # the global.asa are compiled into the same module %EG = ( \'.htaccess\' => \'Configuration parameters that make Apache::ASP tick.\', \'application.asp\' => \'Uses $Application for incrementing a counter.\', \'binary_write.htm\' => \'$Response->BinaryWrite() demo for an asp script serving a gif.\', \'cgi.htm\' => \'Shows compatibility with the CGI.pm library\', \'counting.htm\' => \'Simple asp syntax shown by wrapping a for loop around html and inserting a \'. \'scalar value.\', \'dynamic_includes.htm\' => \'Shows an included file called as a subroutine.\', \'error_document.htm\' => \'Shows a custom error message using the $Response->ErrorDocument() API extension\', \'filter.filter\' => "Demonstrates Apache::ASP\'s ability to act both as a source and destination filter with Apache::Filter.", \'file_upload.asp\' => \'File upload data can be read from the $Request->Form(), \'. \'and is implemented via CGI.pm\', \'footer.inc\' => \'Footer include for most of the scripts listed.\', \'form.asp\' => \'Shows simple use of $Request->Form() and how to get raw input data \'. \' from $Request->BinaryRead()\', \'formfill.asp\' => \'Shows use of FormFill feature, which auto fills HTML forms from \'. \'$Request->Form() data. One must install HTML::FillInForm to use this feature. \', \'global.asa\' => \'The global.asa is the nervous system of an ASP application and \'. \'is where you define your event handlers.\', \'global_asa_demo.asp\' => \'Shows how the global.asa can be used to track users in an \'. \'application\', \'header.inc\' => \'Header include for most of the scripts listed here.\', \'include.htm\' => \'Shows how you can decompose a script into common included files\', # \'ordered_collections.ixhtm\' => # \'Used with Tie::IxHash, shows the natural ordering of the $Request->Form() collection \'. # \'by how the browser submitted the data, useful for some.\', \'register_cleanup.asp\' => \'Demonstrates use of the API extension $Server->RegisterCleanup(). \'. \'Execute code after a response completes in a fail safe way with this routine. \', \'response.asp\' => \'Messy script showing much of the $Response object\\\'s functionality, \'. \'including cookies and buffering.\', \'row.inc\' => \'File dynamically included in the dynamic_includes.htm example\', \'server.htm\' => \'Shows much of the $Server object\\\'s functionality\', \'server_variables.htm\' => \'$Response->ServerVariables() are the equivalent of %ENV in ASP\', \'session.asp\' => \'Shows use of the $Session object, and also demos one implementation \'. \'of cookieless sessions.\', \'session_query_parse.asp\' => "Demonstrates automatic cookieless session support with the SessionQueryParse* ". "settings.", \'source.asp\' => \'Handy source code viewer used to let you easily view the source of \'. \'the other asp scripts.\', \'ssi_filter.ssi\' => \'Shows full SSI in action via Apache::Filter & Apache::SSI. You must compile \'. \'your apache with stacked handlers and install these modules to see \'. \' this script\', \'syntax_error.asp\' => \'Demonstrates asp debugging with Debug 2 by creating a perl syntax error \', \'table.inc\' => \'Another include used to demo dynamic_includes.htm\', \'test.gif\' => \'Source gif for the binary_write.htm example\', \'transfer.htm\' => \'$Server->Transfer() use in action, for speedy redirect type behavior.\', \'xml_subs.asp\' => \'XMLSubsMatch XML Extensions demonstrated, which all custom tags \'. \'to be created by the developer.\', \'xml_subs_strict.asp\' => \'XMLSubsStrict setting causes XMLSubs to accept only string literals \'. \'for arguments, conforming to XML standard more strictly, and \'. \'controlling XMLSubs execution to compile time arguments.\', \'xslt.xml\' => \'XSLT transformation of XML script, using XML::XSLT, and a DBM based cache with the XSLTCache setting. Also possible for the XSLTParser setting is XML::Sablotron for faster XSLT rendering.\', ); $SIG{__DIE__} = \\&Carp::confess; # note if you include XMLSubs in the global.asa, make sure to # switch the package context to the XMLSubs namespace to avoid # any odd variable scoping problems package my; sub my::include { my($args, $text) = @_; # reference the $Response object in the package namespace # since we are in the my:: package and not the GlobalPackage/global.asa $main::Response->Include($args->{src}, title => $args->{title}); } sub my::ttb { my($args, $text) = @_; print "<font face=courier size=-1><b>$text</b></font>"; } sub my::table { my($args, $text) = @_; my $title = delete $args->{title}; my %args = ( # set defaults, and override with %$args border => 0, bgcolor => \'white\', width => \'300\', cellpadding => 3, cellspacing => 0, %$args ); print \'<table \'.join(\' \', map { "$_=$args{$_}" } keys %args, ). \'>\'; print ($title ? "<tr><td bgcolor=black><font color=white>$title</font></td></tr>" : \'\'); print "\\n"; print "<tr><td>"; print $text; print "</td></tr></table>"; } ;; sub exit { $main::Response->End(); } ;; no lib qw(/home/www/html/asp/eg//.); ;; 1;' called at /usr/lib/perl5/site_perl/5.6.0/Apache/ASP/GlobalASA.pm line 122 Apache::ASP::GlobalASA::new('Apache::ASP=HASH(0x84bd968)') called at /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 366 Apache::ASP::new('Apache::ASP', 'Apache=SCALAR(0x83522dc)', '/home/www/html/asp/eg/global_asa_demo.asp') called at /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 169 Apache::ASP::handler('Apache=SCALAR(0x83522dc)') called at /home/www/html/asp/eg//./global.asa line 2 require 0 called at /home/www/html/asp/eg//./global.asa line 2 , /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 1686 <li> creating dbm for file /tmp/asp_demo/server/internal, db SDBM_File, serializer: Data::Dumper <li> creating dbm for file /tmp/asp_demo/server/application, db SDBM_File, serializer: Data::Dumper <li> session id from cookie: 0e5dc46d19d9a02574bea1ccafa64442 <li> refreshing 05bd969f3ad5508b0efd1bb79ebce653 with timeout 1057008348 <li> new session id 05bd969f3ad5508b0efd1bb79ebce653 <li> creating state dir /tmp/asp_demo/05 <li> creating dbm for file /tmp/asp_demo/05/05bd969f3ad5508b0efd1bb79ebce653, db SDBM_File, serializer: Data::Dumper <li> tieing session 05bd969f3ad5508b0efd1bb79ebce653 <li> clearing starting session <li> forcing groups cleanup <li> testing internal time for cleanup groups <li> current_master - Checked: 1057007682; PID: 29046; ServerID: fc0c56569c3459ff; - is_master - 0 <li> 1057007710 time is stale, is_master 0 - Checked: 1057007682; PID: 29046; ServerID: fc0c56569c3459ff; <li> is_master 1 after update 8f4aaf1cef3eb4b7 - 29058 <li> groups - 06; 0e; 05 <li> group check 06, next in 22 sec <li> checking group ids - <li> group check 0e, next in 15 sec <li> checking group ids - 0e5dc46d19d9a02574bea1ccafa64442 <li> resetting timeout for deletion lock on 0e5dc46d19d9a02574bea1ccafa64442 <li> creating dbm for file /tmp/asp_demo/0e/0e5dc46d19d9a02574bea1ccafa64442, db SDBM_File, serializer: Data::Dumper <li> deleting session - files_deleted: 1; session_id: 0e5dc46d19d9a02574bea1ccafa64442; <li> group check 05, next in 11 sec <li> checking group ids - 05bd969f3ad5508b0efd1bb79ebce653 <li> 05bd969f3ad5508b0efd1bb79ebce653 not timed out with 1057008348 <li> cleanup groups - deleted: 0; <li> Application_OnEnd <li> Application_OnStart <li> Session_OnStart - session: 05bd969f3ad5508b0efd1bb79ebce653; <li> updating LastSessionTimeout from 1057008012 <li> ASP Done Processing Apache::ASP=HASH(0x84bd968) - Application: Apache::ASP::Application=HASH(0x863e0d0); GlobalASA: Apache::ASP::GlobalASA=HASH(0x866b0d8); Internal: Apache::ASP::State=HASH(0x860a930); Request: Apache::ASP::Request=HASH(0x866b42c); Response: Apache::ASP::Response=HASH(0x8676da4); Server: Apache::ASP::Server=HASH(0x8676d08); Session: Apache::ASP::Session=HASH(0x8629e40); app_state: 1; basename: global_asa_demo.asp; cleanup: ARRAY(0x835227c); compile_checksum: cf24be1946564ce7ccad2342f87afd03; compile_error: 1; compile_eval: SCALAR(0x8520b28); cookie_path: /; dbg: 3; debugs_output: ARRAY(0x8532f10); destroy: 1; dirname: /home/www/html/asp/eg/; errors_output: ARRAY(0x866b1a4); errs: 1; filename: /home/www/html/asp/eg/global_asa_demo.asp; global: /home/www/html/asp/eg//.; global_package: Apache::ASP::Demo; group_refresh: 30; includes_dir: ARRAY(0x8667e10); init_packages: ARRAY(0x8676e7c); inode_names: ; internal_cached_keys: HASH(0x86aba0c); no_cache: ; package: Apache::ASP::Demo; paranoid_session: 0; r: Apache=SCALAR(0x83522dc); remote_ip: 192.168.223.2; secure_session: ; session_cookie: 1; session_count: 1; session_id: 05bd969f3ad5508b0efd1bb79ebce653; session_serialize: ; session_state: 1; session_timeout: 300; session_url: 1; session_url_force: ; session_url_match: ; session_url_parse: ; session_url_parse_match: ; start_time: 1057008048; stat_inc: ; stat_inc_match: ; stat_scripts: 1; state_db: ; state_dir: /tmp/asp_demo; state_manager: 10; state_serialize: ; state_serializer: ; ua: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0); use_strict: 1; win32: 0; xslt: ; <li> errors out <li> errors compiling global.asa: Can't locate DemoASP.pm in @INC (@INC contains: /home/www/html/asp/eg//. /usr/lib/perl5/site_perl/5.6.0/ /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl . /usr/local/apache/ /usr/local/apache/lib/perl) at /home/www/html/asp/eg//./global.asa line 2. Apache::ASP::Demo::BEGIN() called at DemoASP.pm line 2 require 0 called at DemoASP.pm line 2 eval ' #line 1 /home/www/html/asp/eg//./global.asa package Apache::ASP::Demo; ;; use strict ;; use vars qw($Application $Session $Response $Server $Request); ;; use lib qw(/home/www/html/asp/eg//.); ;; use DemoASP; # import basename() into global.asa namespace use File::Basename qw(basename); # when PerlSetVar UseStrict setting on, need to declare # global variables with "use vars" use vars qw($FontFace $GlobalFont %EG $title); # static read only global $GlobalFont = \'face=verdana,helvetica\'; # this is run every request for all scripts that share this global.asa sub Script_OnStart { $Response->Debug("Script_OnStart $0 in global.asa"); $Session->{Started}++; $title = \'\'; } sub Script_OnEnd { $Response->Debug("Script_OnEnd $0 in global.asa"); $Session->{Ended}++; } # modify data on the way out sub Script_OnFlush { if($Response->{ContentType} eq \'text/html\') { my $data = $Response->{BinaryRef}; $$data =~ s/(\\<(body|td).*?\\>)/$1\\<font $GlobalFont\\>/isg; } my $data = $Response->{BinaryRef}; $Response->Debug("Script_OnFlush: about to flush ".length($$data)." bytes to client"); } sub Session_OnStart { $Session->{Count} = 10; $Session->{onstart} = time(); $Application->{\'Session\'.$Session->SessionID} = \'?\'; $Response->AppendToLog("Session_OnStart! in ./eg/global.asa ". $Session->SessionID); } sub Session_OnEnd { my $t_session_active = time() - $Session->{onstart}; $Application->{\'Session\'.$Session->SessionID} = $t_session_active; $Response->AppendToLog("Session_OnEnd! in ./eg/global.asa ". $Session->SessionID); } sub Application_OnStart { $Response->AppendToLog("Application_OnStart! in ./eg/global.asa"); $Application->{Count} = 20; } sub Application_OnEnd { $Response->AppendToLog("Application_OnEnd! in ./eg/global.asa"); } # you can share globals between scripts as of v.10, as all scripts, including # the global.asa are compiled into the same module %EG = ( \'.htaccess\' => \'Configuration parameters that make Apache::ASP tick.\', \'application.asp\' => \'Uses $Application for incrementing a counter.\', \'binary_write.htm\' => \'$Response->BinaryWrite() demo for an asp script serving a gif.\', \'cgi.htm\' => \'Shows compatibility with the CGI.pm library\', \'counting.htm\' => \'Simple asp syntax shown by wrapping a for loop around html and inserting a \'. \'scalar value.\', \'dynamic_includes.htm\' => \'Shows an included file called as a subroutine.\', \'error_document.htm\' => \'Shows a custom error message using the $Response->ErrorDocument() API extension\', \'filter.filter\' => "Demonstrates Apache::ASP\'s ability to act both as a source and destination filter with Apache::Filter.", \'file_upload.asp\' => \'File upload data can be read from the $Request->Form(), \'. \'and is implemented via CGI.pm\', \'footer.inc\' => \'Footer include for most of the scripts listed.\', \'form.asp\' => \'Shows simple use of $Request->Form() and how to get raw input data \'. \' from $Request->BinaryRead()\', \'formfill.asp\' => \'Shows use of FormFill feature, which auto fills HTML forms from \'. \'$Request->Form() data. One must install HTML::FillInForm to use this feature. \', \'global.asa\' => \'The global.asa is the nervous system of an ASP application and \'. \'is where you define your event handlers.\', \'global_asa_demo.asp\' => \'Shows how the global.asa can be used to track users in an \'. \'application\', \'header.inc\' => \'Header include for most of the scripts listed here.\', \'include.htm\' => \'Shows how you can decompose a script into common included files\', # \'ordered_collections.ixhtm\' => # \'Used with Tie::IxHash, shows the natural ordering of the $Request->Form() collection \'. # \'by how the browser submitted the data, useful for some.\', \'register_cleanup.asp\' => \'Demonstrates use of the API extension $Server->RegisterCleanup(). \'. \'Execute code after a response completes in a fail safe way with this routine. \', \'response.asp\' => \'Messy script showing much of the $Response object\\\'s functionality, \'. \'including cookies and buffering.\', \'row.inc\' => \'File dynamically included in the dynamic_includes.htm example\', \'server.htm\' => \'Shows much of the $Server object\\\'s functionality\', \'server_variables.htm\' => \'$Response->ServerVariables() are the equivalent of %ENV in ASP\', \'session.asp\' => \'Shows use of the $Session object, and also demos one implementation \'. \'of cookieless sessions.\', \'session_query_parse.asp\' => "Demonstrates automatic cookieless session support with the SessionQueryParse* ". "settings.", \'source.asp\' => \'Handy source code viewer used to let you easily view the source of \'. \'the other asp scripts.\', \'ssi_filter.ssi\' => \'Shows full SSI in action via Apache::Filter & Apache::SSI. You must compile \'. \'your apache with stacked handlers and install these modules to see \'. \' this script\', \'syntax_error.asp\' => \'Demonstrates asp debugging with Debug 2 by creating a perl syntax error \', \'table.inc\' => \'Another include used to demo dynamic_includes.htm\', \'test.gif\' => \'Source gif for the binary_write.htm example\', \'transfer.htm\' => \'$Server->Transfer() use in action, for speedy redirect type behavior.\', \'xml_subs.asp\' => \'XMLSubsMatch XML Extensions demonstrated, which all custom tags \'. \'to be created by the developer.\', \'xml_subs_strict.asp\' => \'XMLSubsStrict setting causes XMLSubs to accept only string literals \'. \'for arguments, conforming to XML standard more strictly, and \'. \'controlling XMLSubs execution to compile time arguments.\', \'xslt.xml\' => \'XSLT transformation of XML script, using XML::XSLT, and a DBM based cache with the XSLTCache setting. Also possible for the XSLTParser setting is XML::Sablotron for faster XSLT rendering.\', ); $SIG{__DIE__} = \\&Carp::confess; # note if you include XMLSubs in the global.asa, make sure to # switch the package context to the XMLSubs namespace to avoid # any odd variable scoping problems package my; sub my::include { my($args, $text) = @_; # reference the $Response object in the package namespace # since we are in the my:: package and not the GlobalPackage/global.asa $main::Response->Include($args->{src}, title => $args->{title}); } sub my::ttb { my($args, $text) = @_; print "<font face=courier size=-1><b>$text</b></font>"; } sub my::table { my($args, $text) = @_; my $title = delete $args->{title}; my %args = ( # set defaults, and override with %$args border => 0, bgcolor => \'white\', width => \'300\', cellpadding => 3, cellspacing => 0, %$args ); print \'<table \'.join(\' \', map { "$_=$args{$_}" } keys %args, ). \'>\'; print ($title ? "<tr><td bgcolor=black><font color=white>$title</font></td></tr>" : \'\'); print "\\n"; print "<tr><td>"; print $text; print "</td></tr></table>"; } ;; sub exit { $main::Response->End(); } ;; no lib qw(/home/www/html/asp/eg//.); ;; 1;' called at /usr/lib/perl5/site_perl/5.6.0/Apache/ASP/GlobalASA.pm line 122 Apache::ASP::GlobalASA::new('Apache::ASP=HASH(0x84bd968)') called at /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 366 Apache::ASP::new('Apache::ASP', 'Apache=SCALAR(0x83522dc)', '/home/www/html/asp/eg/global_asa_demo.asp') called at /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 169 Apache::ASP::handler('Apache=SCALAR(0x83522dc)') called at DemoASP.pm line 2 require 0 called at DemoASP.pm line 2 BEGIN failed--compilation aborted at /home/www/html/asp/eg//./global.asa line 2. eval ' #line 1 /home/www/html/asp/eg//./global.asa package Apache::ASP::Demo; ;; use strict ;; use vars qw($Application $Session $Response $Server $Request); ;; use lib qw(/home/www/html/asp/eg//.); ;; use DemoASP; # import basename() into global.asa namespace use File::Basename qw(basename); # when PerlSetVar UseStrict setting on, need to declare # global variables with "use vars" use vars qw($FontFace $GlobalFont %EG $title); # static read only global $GlobalFont = \'face=verdana,helvetica\'; # this is run every request for all scripts that share this global.asa sub Script_OnStart { $Response->Debug("Script_OnStart $0 in global.asa"); $Session->{Started}++; $title = \'\'; } sub Script_OnEnd { $Response->Debug("Script_OnEnd $0 in global.asa"); $Session->{Ended}++; } # modify data on the way out sub Script_OnFlush { if($Response->{ContentType} eq \'text/html\') { my $data = $Response->{BinaryRef}; $$data =~ s/(\\<(body|td).*?\\>)/$1\\<font $GlobalFont\\>/isg; } my $data = $Response->{BinaryRef}; $Response->Debug("Script_OnFlush: about to flush ".length($$data)." bytes to client"); } sub Session_OnStart { $Session->{Count} = 10; $Session->{onstart} = time(); $Application->{\'Session\'.$Session->SessionID} = \'?\'; $Response->AppendToLog("Session_OnStart! in ./eg/global.asa ". $Session->SessionID); } sub Session_OnEnd { my $t_session_active = time() - $Session->{onstart}; $Application->{\'Session\'.$Session->SessionID} = $t_session_active; $Response->AppendToLog("Session_OnEnd! in ./eg/global.asa ". $Session->SessionID); } sub Application_OnStart { $Response->AppendToLog("Application_OnStart! in ./eg/global.asa"); $Application->{Count} = 20; } sub Application_OnEnd { $Response->AppendToLog("Application_OnEnd! in ./eg/global.asa"); } # you can share globals between scripts as of v.10, as all scripts, including # the global.asa are compiled into the same module %EG = ( \'.htaccess\' => \'Configuration parameters that make Apache::ASP tick.\', \'application.asp\' => \'Uses $Application for incrementing a counter.\', \'binary_write.htm\' => \'$Response->BinaryWrite() demo for an asp script serving a gif.\', \'cgi.htm\' => \'Shows compatibility with the CGI.pm library\', \'counting.htm\' => \'Simple asp syntax shown by wrapping a for loop around html and inserting a \'. \'scalar value.\', \'dynamic_includes.htm\' => \'Shows an included file called as a subroutine.\', \'error_document.htm\' => \'Shows a custom error message using the $Response->ErrorDocument() API extension\', \'filter.filter\' => "Demonstrates Apache::ASP\'s ability to act both as a source and destination filter with Apache::Filter.", \'file_upload.asp\' => \'File upload data can be read from the $Request->Form(), \'. \'and is implemented via CGI.pm\', \'footer.inc\' => \'Footer include for most of the scripts listed.\', \'form.asp\' => \'Shows simple use of $Request->Form() and how to get raw input data \'. \' from $Request->BinaryRead()\', \'formfill.asp\' => \'Shows use of FormFill feature, which auto fills HTML forms from \'. \'$Request->Form() data. One must install HTML::FillInForm to use this feature. \', \'global.asa\' => \'The global.asa is the nervous system of an ASP application and \'. \'is where you define your event handlers.\', \'global_asa_demo.asp\' => \'Shows how the global.asa can be used to track users in an \'. \'application\', \'header.inc\' => \'Header include for most of the scripts listed here.\', \'include.htm\' => \'Shows how you can decompose a script into common included files\', # \'ordered_collections.ixhtm\' => # \'Used with Tie::IxHash, shows the natural ordering of the $Request->Form() collection \'. # \'by how the browser submitted the data, useful for some.\', \'register_cleanup.asp\' => \'Demonstrates use of the API extension $Server->RegisterCleanup(). \'. \'Execute code after a response completes in a fail safe way with this routine. \', \'response.asp\' => \'Messy script showing much of the $Response object\\\'s functionality, \'. \'including cookies and buffering.\', \'row.inc\' => \'File dynamically included in the dynamic_includes.htm example\', \'server.htm\' => \'Shows much of the $Server object\\\'s functionality\', \'server_variables.htm\' => \'$Response->ServerVariables() are the equivalent of %ENV in ASP\', \'session.asp\' => \'Shows use of the $Session object, and also demos one implementation \'. \'of cookieless sessions.\', \'session_query_parse.asp\' => "Demonstrates automatic cookieless session support with the SessionQueryParse* ". "settings.", \'source.asp\' => \'Handy source code viewer used to let you easily view the source of \'. \'the other asp scripts.\', \'ssi_filter.ssi\' => \'Shows full SSI in action via Apache::Filter & Apache::SSI. You must compile \'. \'your apache with stacked handlers and install these modules to see \'. \' this script\', \'syntax_error.asp\' => \'Demonstrates asp debugging with Debug 2 by creating a perl syntax error \', \'table.inc\' => \'Another include used to demo dynamic_includes.htm\', \'test.gif\' => \'Source gif for the binary_write.htm example\', \'transfer.htm\' => \'$Server->Transfer() use in action, for speedy redirect type behavior.\', \'xml_subs.asp\' => \'XMLSubsMatch XML Extensions demonstrated, which all custom tags \'. \'to be created by the developer.\', \'xml_subs_strict.asp\' => \'XMLSubsStrict setting causes XMLSubs to accept only string literals \'. \'for arguments, conforming to XML standard more strictly, and \'. \'controlling XMLSubs execution to compile time arguments.\', \'xslt.xml\' => \'XSLT transformation of XML script, using XML::XSLT, and a DBM based cache with the XSLTCache setting. Also possible for the XSLTParser setting is XML::Sablotron for faster XSLT rendering.\', ); $SIG{__DIE__} = \\&Carp::confess; # note if you include XMLSubs in the global.asa, make sure to # switch the package context to the XMLSubs namespace to avoid # any odd variable scoping problems package my; sub my::include { my($args, $text) = @_; # reference the $Response object in the package namespace # since we are in the my:: package and not the GlobalPackage/global.asa $main::Response->Include($args->{src}, title => $args->{title}); } sub my::ttb { my($args, $text) = @_; print "<font face=courier size=-1><b>$text</b></font>"; } sub my::table { my($args, $text) = @_; my $title = delete $args->{title}; my %args = ( # set defaults, and override with %$args border => 0, bgcolor => \'white\', width => \'300\', cellpadding => 3, cellspacing => 0, %$args ); print \'<table \'.join(\' \', map { "$_=$args{$_}" } keys %args, ). \'>\'; print ($title ? "<tr><td bgcolor=black><font color=white>$title</font></td></tr>" : \'\'); print "\\n"; print "<tr><td>"; print $text; print "</td></tr></table>"; } ;; sub exit { $main::Response->End(); } ;; no lib qw(/home/www/html/asp/eg//.); ;; 1;' called at /usr/lib/perl5/site_perl/5.6.0/Apache/ASP/GlobalASA.pm line 122 Apache::ASP::GlobalASA::new('Apache::ASP=HASH(0x84bd968)') called at /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 366 Apache::ASP::new('Apache::ASP', 'Apache=SCALAR(0x83522dc)', '/home/www/html/asp/eg/global_asa_demo.asp') called at /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 169 Apache::ASP::handler('Apache=SCALAR(0x83522dc)') called at /home/www/html/asp/eg//./global.asa line 2 require 0 called at /home/www/html/asp/eg//./global.asa line 2 , /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 1686 </ol> </tt> <pre> <b><u>Compiled Data with Error</u></b><a name=1> </a> -: -: #line 1 /home/www/html/asp/eg//./global.asa <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%201> 1</a>: package Apache::ASP::Demo; ;; use strict ;; use vars qw($Application $Session $Response $Server $Request); ;; use lib qw(/home/www/html/asp/eg//.); ;; <b><font color=red><a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%202> 2</a></font></b>: use DemoASP; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%203> 3</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%204> 4</a>: # import basename() into global.asa namespace <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%205> 5</a>: use File::Basename qw(basename); <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%206> 6</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%207> 7</a>: # when PerlSetVar UseStrict setting on, need to declare <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%208> 8</a>: # global variables with "use vars" <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%209> 9</a>: use vars qw($FontFace $GlobalFont %EG $title); <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2010> 10</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2011> 11</a>: # static read only global <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2012> 12</a>: $GlobalFont = 'face=verdana,helvetica'; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2013> 13</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2014> 14</a>: # this is run every request for all scripts that share this global.asa <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2015> 15</a>: sub Script_OnStart { <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2016> 16</a>: $Response->Debug("Script_OnStart $0 in global.asa"); <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2017> 17</a>: $Session->{Started}++; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2018> 18</a>: $title = ''; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2019> 19</a>: } <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2020> 20</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2021> 21</a>: sub Script_OnEnd { <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2022> 22</a>: $Response->Debug("Script_OnEnd $0 in global.asa"); <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2023> 23</a>: $Session->{Ended}++; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2024> 24</a>: } <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2025> 25</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2026> 26</a>: # modify data on the way out <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2027> 27</a>: sub Script_OnFlush { <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2028> 28</a>: if($Response->{ContentType} eq 'text/html') { <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2029> 29</a>: my $data = $Response->{BinaryRef}; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2030> 30</a>: $$data =~ s/(\<(body|td).*?\>)/$1\<font $GlobalFont\>/isg; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2031> 31</a>: } <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2032> 32</a>: my $data = $Response->{BinaryRef}; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2033> 33</a>: $Response->Debug("Script_OnFlush: about to flush ".length($$data)." bytes to client"); <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2034> 34</a>: } <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2035> 35</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2036> 36</a>: sub Session_OnStart { <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2037> 37</a>: $Session->{Count} = 10; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2038> 38</a>: $Session->{onstart} = time(); <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2039> 39</a>: $Application->{'Session'.$Session->SessionID} = '?'; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2040> 40</a>: $Response->AppendToLog("Session_OnStart! in ./eg/global.asa ". $Session->SessionID); <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2041> 41</a>: } <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2042> 42</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2043> 43</a>: sub Session_OnEnd { <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2044> 44</a>: my $t_session_active = time() - $Session->{onstart}; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2045> 45</a>: $Application->{'Session'.$Session->SessionID} = $t_session_active; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2046> 46</a>: $Response->AppendToLog("Session_OnEnd! in ./eg/global.asa ". $Session->SessionID); <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2047> 47</a>: } <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2048> 48</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2049> 49</a>: sub Application_OnStart { <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2050> 50</a>: $Response->AppendToLog("Application_OnStart! in ./eg/global.asa"); <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2051> 51</a>: $Application->{Count} = 20; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2052> 52</a>: } <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2053> 53</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2054> 54</a>: sub Application_OnEnd { <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2055> 55</a>: $Response->AppendToLog("Application_OnEnd! in ./eg/global.asa"); <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2056> 56</a>: } <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2057> 57</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2058> 58</a>: # you can share globals between scripts as of v.10, as all scripts, including <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2059> 59</a>: # the global.asa are compiled into the same module <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2060> 60</a>: %EG = ( <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2061> 61</a>: '.htaccess' => 'Configuration parameters that make Apache::ASP tick.', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2062> 62</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2063> 63</a>: 'application.asp' => 'Uses $Application for incrementing a counter.', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2064> 64</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2065> 65</a>: 'binary_write.htm' => '$Response->BinaryWrite() demo for an asp script serving a gif.', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2066> 66</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2067> 67</a>: 'cgi.htm' => 'Shows compatibility with the CGI.pm library', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2068> 68</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2069> 69</a>: 'counting.htm' => 'Simple asp syntax shown by wrapping a for loop around html and inserting a '. <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2070> 70</a>: 'scalar value.', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2071> 71</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2072> 72</a>: 'dynamic_includes.htm' => 'Shows an included file called as a subroutine.', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2073> 73</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2074> 74</a>: 'error_document.htm' => 'Shows a custom error message using the $Response->ErrorDocument() API extension', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2075> 75</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2076> 76</a>: 'filter.filter' => "Demonstrates Apache::ASP's ability to act both as a source and destination filter with Apache::Filter.", <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2077> 77</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2078> 78</a>: 'file_upload.asp' => 'File upload data can be read from the $Request->Form(), '. <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2079> 79</a>: 'and is implemented via CGI.pm', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2080> 80</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2081> 81</a>: 'footer.inc' => 'Footer include for most of the scripts listed.', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2082> 82</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2083> 83</a>: 'form.asp' => 'Shows simple use of $Request->Form() and how to get raw input data '. <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2084> 84</a>: ' from $Request->BinaryRead()', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2085> 85</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2086> 86</a>: 'formfill.asp' => <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2087> 87</a>: 'Shows use of FormFill feature, which auto fills HTML forms from '. <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2088> 88</a>: '$Request->Form() data. One must install HTML::FillInForm to use this feature. ', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2089> 89</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2090> 90</a>: 'global.asa' => 'The global.asa is the nervous system of an ASP application and '. <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2091> 91</a>: 'is where you define your event handlers.', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2092> 92</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2093> 93</a>: 'global_asa_demo.asp' => 'Shows how the global.asa can be used to track users in an '. <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2094> 94</a>: 'application', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2095> 95</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2096> 96</a>: 'header.inc' => 'Header include for most of the scripts listed here.', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2097> 97</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2098> 98</a>: 'include.htm' => 'Shows how you can decompose a script into common included files', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%2099> 99</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20100>100</a>: # 'ordered_collections.ixhtm' => <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20101>101</a>: # 'Used with Tie::IxHash, shows the natural ordering of the $Request->Form() collection '. <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20102>102</a>: # 'by how the browser submitted the data, useful for some.', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20103>103</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20104>104</a>: 'register_cleanup.asp' => 'Demonstrates use of the API extension $Server->RegisterCleanup(). '. <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20105>105</a>: 'Execute code after a response completes in a fail safe way with this routine. ', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20106>106</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20107>107</a>: 'response.asp' => 'Messy script showing much of the $Response object\'s functionality, '. <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20108>108</a>: 'including cookies and buffering.', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20109>109</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20110>110</a>: 'row.inc' => 'File dynamically included in the dynamic_includes.htm example', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20111>111</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20112>112</a>: 'server.htm' => 'Shows much of the $Server object\'s functionality', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20113>113</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20114>114</a>: 'server_variables.htm' => '$Response->ServerVariables() are the equivalent of %ENV in ASP', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20115>115</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20116>116</a>: 'session.asp' => <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20117>117</a>: 'Shows use of the $Session object, and also demos one implementation '. <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20118>118</a>: 'of cookieless sessions.', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20119>119</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20120>120</a>: 'session_query_parse.asp' => <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20121>121</a>: "Demonstrates automatic cookieless session support with the SessionQueryParse* ". <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20122>122</a>: "settings.", <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20123>123</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20124>124</a>: 'source.asp' => 'Handy source code viewer used to let you easily view the source of '. <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20125>125</a>: 'the other asp scripts.', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20126>126</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20127>127</a>: 'ssi_filter.ssi' => 'Shows full SSI in action via Apache::Filter & Apache::SSI. You must compile '. <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20128>128</a>: 'your apache with stacked handlers and install these modules to see '. <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20129>129</a>: ' this script', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20130>130</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20131>131</a>: 'syntax_error.asp' => 'Demonstrates asp debugging with Debug 2 by creating a perl syntax error ', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20132>132</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20133>133</a>: 'table.inc' => 'Another include used to demo dynamic_includes.htm', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20134>134</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20135>135</a>: 'test.gif' => 'Source gif for the binary_write.htm example', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20136>136</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20137>137</a>: 'transfer.htm' => '$Server->Transfer() use in action, for speedy redirect type behavior.', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20138>138</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20139>139</a>: 'xml_subs.asp' => <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20140>140</a>: 'XMLSubsMatch XML Extensions demonstrated, which all custom tags '. <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20141>141</a>: 'to be created by the developer.', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20142>142</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20143>143</a>: 'xml_subs_strict.asp' => <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20144>144</a>: 'XMLSubsStrict setting causes XMLSubs to accept only string literals '. <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20145>145</a>: 'for arguments, conforming to XML standard more strictly, and '. <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20146>146</a>: 'controlling XMLSubs execution to compile time arguments.', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20147>147</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20148>148</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20149>149</a>: 'xslt.xml' => 'XSLT transformation of XML script, using XML::XSLT, and a DBM based cache with the XSLTCache setting. Also possible for the XSLTParser setting is XML::Sablotron for faster XSLT rendering.', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20150>150</a>: ); <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20151>151</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20152>152</a>: $SIG{__DIE__} = \&Carp::confess; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20153>153</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20154>154</a>: # note if you include XMLSubs in the global.asa, make sure to <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20155>155</a>: # switch the package context to the XMLSubs namespace to avoid <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20156>156</a>: # any odd variable scoping problems <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20157>157</a>: package my; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20158>158</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20159>159</a>: sub my::include { <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20160>160</a>: my($args, $text) = @_; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20161>161</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20162>162</a>: # reference the $Response object in the package namespace <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20163>163</a>: # since we are in the my:: package and not the GlobalPackage/global.asa <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20164>164</a>: $main::Response->Include($args->{src}, title => $args->{title}); <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20165>165</a>: } <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20166>166</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20167>167</a>: sub my::ttb { <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20168>168</a>: my($args, $text) = @_; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20169>169</a>: print "<font face=courier size=-1><b>$text</b></font>"; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20170>170</a>: } <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20171>171</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20172>172</a>: sub my::table { <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20173>173</a>: my($args, $text) = @_; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20174>174</a>: my $title = delete $args->{title}; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20175>175</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20176>176</a>: my %args = ( <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20177>177</a>: # set defaults, and override with %$args <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20178>178</a>: border => 0, <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20179>179</a>: bgcolor => 'white', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20180>180</a>: width => '300', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20181>181</a>: cellpadding => 3, <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20182>182</a>: cellspacing => 0, <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20183>183</a>: %$args <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20184>184</a>: ); <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20185>185</a>: <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20186>186</a>: print '<table '.join(' ', <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20187>187</a>: map { "$_=$args{$_}" } keys %args, <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20188>188</a>: ). '>'; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20189>189</a>: print ($title ? "<tr><td bgcolor=black><font color=white>$title</font></td></tr>" : ''); <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20190>190</a>: print "\n"; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20191>191</a>: print "<tr><td>"; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20192>192</a>: print $text; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20193>193</a>: print "</td></tr></table>"; <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20194>194</a>: } <a name=%2Fhome%2Fwww%2Fhtml%2Fasp%2Feg%2F%2F.%2Fglobal.asa%20195>195</a>: ;; sub exit { $main::Response->End(); } ;; no lib qw(/home/www/html/asp/eg//.); ;; 1; </pre> <hr width=30% size=1> <font size=-1> <i> An error has occured with the Apache::ASP script just run. If you are the developer working on this script, and cannot work through this problem, please try researching it at the <a href=http://www.apache-asp.org/>Apache::ASP web site</a>, specifically the <a href=http://www.apache-asp.org/faq.html>FAQ section</a>. Failing that, check out your <a href=http://www.apache-asp.org/support.html>support options</a>, and if necessary include this debug output with any query.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]