home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / perl / Hello.pm < prev    next >
Encoding:
Perl POD Document  |  2003-11-22  |  468 b   |  22 lines

  1. package Apache::Hello;
  2. use strict;
  3. use Apache::RequestRec ();  # for $r->content_type
  4. use Apache::RequestIO ();   # for $r->print
  5. use Apache::Const -compile => ':common';
  6.  
  7. sub handler {
  8.    my $r = shift;
  9.    my $time = scalar localtime();
  10.    my $package = __PACKAGE__;
  11.    $r->content_type('text/html');
  12.    $r->print(<<"END");
  13. <HTML><BODY>
  14. <H3>Hello</H3>
  15. Hello from <B>$package</B>! The time is $time.
  16. </BODY></HTML>
  17. END
  18.    return Apache::OK;
  19. }
  20.  
  21. 1;
  22.