#!/usr/local/bin/perl5 asp

<% 
	$Response->{Buffer} = 0; 
%>
=pod
This pod comment should be yanked upon compilation
=cut

<!--#include file=header.inc-->
We are creating a perl syntax error... this should demonstrate 
how error handling is done.  Please check the error log file if 
you are interested in the output there.
<p>
You can turn this error messaging off by setting the Debug variable
in the ASP config to 1 or 0.
<p>
Also here is an example of how you can use debugging, an API
extension $Response->Debug(@args), in your script.  The debug 
output will show up below, and in your error logs.  This user 
style debugging is turned off with the same Debug setting set to 0.
<p>
<% 
   $Response->Debug(
	"Debugging", 
	['can', 'take'], 
	{'just'=>'about'},
	sub { ['any', 'kind']},
	\"of reference",
	"or scalar"
	);
%>
<a href="source.asp?file=<%=$Request->ServerVariables("SCRIPT_NAME")%>">
view this file's source
</a>
<% 
	# flush output that we have written so far, for prettier error
	$Response->Flush();
	
	# create a run-time syntax error
	$Object->SyntaxError(); 
%>
