[LON-CAPA-cvs] cvs: nsdl /lib/perl/Apache/NSDL ToTheGateway.pm

harris41 lon-capa-cvs@mail.lon-capa.org
Thu, 23 May 2002 19:54:28 -0000


harris41		Thu May 23 15:54:28 2002 EDT

  Modified files:              
    /nsdl/lib/perl/Apache/NSDL	ToTheGateway.pm 
  Log:
  a test handler
  
  
Index: nsdl/lib/perl/Apache/NSDL/ToTheGateway.pm
diff -u nsdl/lib/perl/Apache/NSDL/ToTheGateway.pm:1.2 nsdl/lib/perl/Apache/NSDL/ToTheGateway.pm:1.3
--- nsdl/lib/perl/Apache/NSDL/ToTheGateway.pm:1.2	Mon May  6 15:51:21 2002
+++ nsdl/lib/perl/Apache/NSDL/ToTheGateway.pm	Thu May 23 15:54:28 2002
@@ -37,11 +37,29 @@
 
 # ================================================================ DEPENDENCIES
 use strict; # enforce handling of variables, references and subroutines
+use Apache::Constants qw(:common);
 
 # ============================================================ MODULE VARIABLES
-my $VERSION = sprintf("%d.%02d", q$Revision: 1.2 $ =~ /(\d+)\.(\d+)/);
+my $VERSION = sprintf("%d.%02d", q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/);
 
 # ================================================================= SUBROUTINES
+
+# ----------------------------- Handling routine called via Apache and mod_perl
+sub handler {
+    my $r = shift;
+    $r->content_type('text/html');
+    $r->send_http_header;
+    return(OK) if $r->header_only;
+    $r->print(<<END);
+<html>
+<head><title>Test Output</title></head>
+<body>
+Apache::NSDL::ToTheGateway
+</body>
+</html>
+END
+    return(OK);
+}
 
 # ------------------------------------------- NSDL->answer_list_records_request
 sub answer_list_records_request {