[LON-CAPA-cvs] cvs: modules /jerf/tests/Apache Constants.pm

bowersj2 lon-capa-cvs@mail.lon-capa.org
Thu, 22 May 2003 18:52:49 -0000


bowersj2		Thu May 22 14:52:49 2003 EDT

  Added files:                 
    /modules/jerf/tests/Apache	Constants.pm 
  Log:
  Constants simulator for testing.
  
  (These are ripped directly from a running server; a surprising number of 
  the constants are just undef!)
  
  

Index: modules/jerf/tests/Apache/Constants.pm
+++ modules/jerf/tests/Apache/Constants.pm
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
# $Id: Constants.pm,v 1.1 2003/05/22 18:52:49 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
#
# LON-CAPA is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LON-CAPA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LON-CAPA; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
# /home/httpd/html/adm/gpl.txt
#
# http://www.lon-capa.org/
#
# (Testing Infrastructure: Apache Constants Simulator

=pod

=head1 Apache Constants Simulator

In order to simulate the Apache environment, these constants need to be exported.
However the main Apache::Constants.pm file expects to extract them from mod_perl,
which we can't do if we're running outside of the server. This file provides the
constants as needed.

=cut

package Apache::Constants;

use Exporter;
@ISA = ('Exporter');

@EXPORT = qw( 
              OK DECLINED DONE NOT_FOUND FORBIDDEN AUTH_REQUIRED SERVER_ERROR

              DOCUMENT_FOLLOWS MOVED REDIRECT USE_LOCAL_COPY BAD_REQUEST BAD_GATEWAY
              RESPONSE_CODES NOT_IMPLEMENTED CONTINUE NOT_AUTHORITATIVE

              METHODS M_CONNECT M_DELETE M_GET M_INVALID M_OPTIONS M_POST M_TRACE
              M_PATCH M_PROPFIND M_PROPPATCH M_MKCOL M_COPY M_MOVE M_LOCK M_UNLOCK

              OPT_NONE OPT_INDEXES OPT_INCLUDES OPT_SYM_LINKS OPT_EXECCGI
              OPT_UNSET OPT_INCNOEXEC OPT_SYM_OWNER OPT_MULTI OPT_ALL

              SATISFY_ALL SATISFY_ANY SATISFY_NOSPEC

              REMOTE_HOST REMOTE_NAME REMOTE_NOLOOKUP REMOVE_DOUBLE_REV

              HTTP_OK
              HTTP_MOVED_TEMPORARILY
              HTTP_MOVED_PERMANENTLY
              HTTP_METHOD_NOT_ALLOWED
              HTTP_NOT_MODIFIED
              HTTP_UNAUTHORIZED
              HTTP_FORBIDDEN
              HTTP_NOT_FOUND
              HTTP_BAD_REQUEST
              HTTP_INTERNAL_SERVER_ERROR
              HTTP_NOT_ACCEPTABLE
              HTTP_NO_CONTENT
              HTTP_PRECONDITION_FAILED
              HTTP_SERVICE_UNAVAILABLE
              HTTP_VARIANT_ALSO_VARIES
                                                                                
              MODULE_MAGIC_NUMBER
              SERVER_VERSION
              SERVER_BUILT
                  
              DECLINE_CMD

              DIR_MAGIC_TYPE

              OR_NONE
              OR_LIMIT
              OR_OPTIONS
              OR_FILEINFO
              OR_AUTHCFG
              OR_INDEXES
              OR_UNSET
              OR_ALL
              ACCESS_CONF
              RSRC_CONF
                                                                                
              RAW_ARGS
              TAKE1
              TAKE2
              TAKE12
              TAKE3
              TAKE23
              TAKE123
              ITERATE
              ITERATE2
              FLAG
              NO_ARGS);
                                                                                

# This file was generated by running the following code inside of an Apache
# handler:
# use Data::Dumper
# my @EXPORTS = (above list)
# use Apache::Constants();

# inside the handler:

# $Data::Dumper::Terse = 1;
# for (@EXPORT) { $r->print("sub $_ { return " . Dumper(eval('Apache::Constants::' . $_))  . ";}\n");}

# and pasting the resulting output below.
# Surprising amount of undefs in there...

sub OK { return 0
;}
sub DECLINED { return -1
;}
sub DONE { return -2
;}
sub NOT_FOUND { return 404
;}
sub FORBIDDEN { return 403
;}
sub AUTH_REQUIRED { return 401
;}
sub SERVER_ERROR { return 500
;}
sub DOCUMENT_FOLLOWS { return undef
;}
sub MOVED { return undef
;}
sub REDIRECT { return 302
;}
sub USE_LOCAL_COPY { return undef
;}
sub BAD_REQUEST { return undef
;}
sub BAD_GATEWAY { return undef
;}
sub RESPONSE_CODES { return undef
;}
sub NOT_IMPLEMENTED { return undef
;}
sub CONTINUE { return undef
;}
sub NOT_AUTHORITATIVE { return undef
;}
sub METHODS { return 16
;}
sub M_CONNECT { return 4
;}
sub M_DELETE { return 3
;}
sub M_GET { return 0
;}
sub M_INVALID { return 15
;}
sub M_OPTIONS { return 5
;}
sub M_POST { return 2
;}
sub M_TRACE { return 6
;}
sub M_PATCH { return 7
;}
sub M_PROPFIND { return 8
;}
sub M_PROPPATCH { return 9
;}
sub M_MKCOL { return 10
;}
sub M_COPY { return 11
;}
sub M_MOVE { return 12
;}
sub M_LOCK { return 13
;}
sub M_UNLOCK { return 14
;}
sub OPT_NONE { return undef
;}
sub OPT_INDEXES { return undef
;}
sub OPT_INCLUDES { return undef
;}
sub OPT_SYM_LINKS { return undef
;}
sub OPT_EXECCGI { return undef
;}
sub OPT_UNSET { return undef
;}
sub OPT_INCNOEXEC { return undef
;}
sub OPT_SYM_OWNER { return undef
;}
sub OPT_MULTI { return undef
;}
sub OPT_ALL { return undef
;}
sub SATISFY_ALL { return undef
;}
sub SATISFY_ANY { return undef
;}
sub SATISFY_NOSPEC { return undef
;}
sub REMOTE_HOST { return 0
;}
sub REMOTE_NAME { return 1
;}
sub REMOTE_NOLOOKUP { return 2
;}
sub REMOVE_DOUBLE_REV { return undef
;}
sub HTTP_OK { return 200
;}
sub HTTP_MOVED_TEMPORARILY { return 302
;}
sub HTTP_MOVED_PERMANENTLY { return 301
;}
sub HTTP_METHOD_NOT_ALLOWED { return 405
;}
sub HTTP_NOT_MODIFIED { return 304
;}
sub HTTP_UNAUTHORIZED { return 401
;}
sub HTTP_FORBIDDEN { return 403
;}
sub HTTP_NOT_FOUND { return 404
;}
sub HTTP_BAD_REQUEST { return 400
;}
sub HTTP_INTERNAL_SERVER_ERROR { return 500
;}
sub HTTP_NOT_ACCEPTABLE { return 406
;}
sub HTTP_NO_CONTENT { return 204
;}
sub HTTP_PRECONDITION_FAILED { return 412
;}
sub HTTP_SERVICE_UNAVAILABLE { return 503
;}
sub HTTP_VARIANT_ALSO_VARIES { return 506
;}
sub MODULE_MAGIC_NUMBER { return undef
;}
sub SERVER_VERSION { return 'Apache/1.3.27 (Unix)  (Gentoo/Linux) mod_perl/1.27'
;}
sub SERVER_BUILT { return 'May 19 2003 13:07:19'
;}
sub DECLINE_CMD { return ''
;}
sub DIR_MAGIC_TYPE { return 'httpd/unix-directory'
;}
sub OR_NONE { return undef
;}
sub OR_LIMIT { return undef
;}
sub OR_OPTIONS { return undef
;}
sub OR_FILEINFO { return undef
;}
sub OR_AUTHCFG { return undef
;}
sub OR_INDEXES { return undef
;}
sub OR_UNSET { return undef
;}
sub OR_ALL { return undef
;}
sub ACCESS_CONF { return undef
;}
sub RSRC_CONF { return undef
;}
sub RAW_ARGS { return undef
;}
sub TAKE1 { return undef
;}
sub TAKE2 { return undef
;}
sub TAKE12 { return undef
;}
sub TAKE3 { return undef
;}
sub TAKE23 { return undef
;}
sub TAKE123 { return undef
;}
sub ITERATE { return undef
;}
sub ITERATE2 { return undef
;}
sub FLAG { return undef
;}
sub NO_ARGS { return undef
;}