Annotation of embedaddon/nginx/src/http/modules/perl/nginx.pm, revision 1.1
1.1 ! misho 1: package nginx;
! 2:
! 3: use 5.006001;
! 4: use strict;
! 5: use warnings;
! 6:
! 7: require Exporter;
! 8:
! 9: our @ISA = qw(Exporter);
! 10:
! 11: our @EXPORT = qw(
! 12: OK
! 13: DECLINED
! 14:
! 15: HTTP_OK
! 16: HTTP_CREATED
! 17: HTTP_ACCEPTED
! 18: HTTP_NO_CONTENT
! 19: HTTP_PARTIAL_CONTENT
! 20:
! 21: HTTP_MOVED_PERMANENTLY
! 22: HTTP_MOVED_TEMPORARILY
! 23: HTTP_REDIRECT
! 24: HTTP_SEE_OTHER
! 25: HTTP_NOT_MODIFIED
! 26: HTTP_TEMPORARY_REDIRECT
! 27:
! 28: HTTP_BAD_REQUEST
! 29: HTTP_UNAUTHORIZED
! 30: HTTP_PAYMENT_REQUIRED
! 31: HTTP_FORBIDDEN
! 32: HTTP_NOT_FOUND
! 33: HTTP_NOT_ALLOWED
! 34: HTTP_NOT_ACCEPTABLE
! 35: HTTP_REQUEST_TIME_OUT
! 36: HTTP_CONFLICT
! 37: HTTP_GONE
! 38: HTTP_LENGTH_REQUIRED
! 39: HTTP_REQUEST_ENTITY_TOO_LARGE
! 40: HTTP_REQUEST_URI_TOO_LARGE
! 41: HTTP_UNSUPPORTED_MEDIA_TYPE
! 42: HTTP_RANGE_NOT_SATISFIABLE
! 43:
! 44: HTTP_INTERNAL_SERVER_ERROR
! 45: HTTP_SERVER_ERROR
! 46: HTTP_NOT_IMPLEMENTED
! 47: HTTP_BAD_GATEWAY
! 48: HTTP_SERVICE_UNAVAILABLE
! 49: HTTP_GATEWAY_TIME_OUT
! 50: HTTP_INSUFFICIENT_STORAGE
! 51: );
! 52:
! 53: our $VERSION = '%%VERSION%%';
! 54:
! 55: require XSLoader;
! 56: XSLoader::load('nginx', $VERSION);
! 57:
! 58: # Preloaded methods go here.
! 59:
! 60: use constant OK => 0;
! 61: use constant DECLINED => -5;
! 62:
! 63: use constant HTTP_OK => 200;
! 64: use constant HTTP_CREATED => 201;
! 65: use constant HTTP_ACCEPTED => 202;
! 66: use constant HTTP_NO_CONTENT => 204;
! 67: use constant HTTP_PARTIAL_CONTENT => 206;
! 68:
! 69: use constant HTTP_MOVED_PERMANENTLY => 301;
! 70: use constant HTTP_MOVED_TEMPORARILY => 302;
! 71: use constant HTTP_REDIRECT => 302;
! 72: use constant HTTP_SEE_OTHER => 303;
! 73: use constant HTTP_NOT_MODIFIED => 304;
! 74: use constant HTTP_TEMPORARY_REDIRECT => 307;
! 75:
! 76: use constant HTTP_BAD_REQUEST => 400;
! 77: use constant HTTP_UNAUTHORIZED => 401;
! 78: use constant HTTP_PAYMENT_REQUIRED => 402;
! 79: use constant HTTP_FORBIDDEN => 403;
! 80: use constant HTTP_NOT_FOUND => 404;
! 81: use constant HTTP_NOT_ALLOWED => 405;
! 82: use constant HTTP_NOT_ACCEPTABLE => 406;
! 83: use constant HTTP_REQUEST_TIME_OUT => 408;
! 84: use constant HTTP_CONFLICT => 409;
! 85: use constant HTTP_GONE => 410;
! 86: use constant HTTP_LENGTH_REQUIRED => 411;
! 87: use constant HTTP_REQUEST_ENTITY_TOO_LARGE => 413;
! 88: use constant HTTP_REQUEST_URI_TOO_LARGE => 414;
! 89: use constant HTTP_UNSUPPORTED_MEDIA_TYPE => 415;
! 90: use constant HTTP_RANGE_NOT_SATISFIABLE => 416;
! 91:
! 92: use constant HTTP_INTERNAL_SERVER_ERROR => 500;
! 93: use constant HTTP_SERVER_ERROR => 500;
! 94: use constant HTTP_NOT_IMPLEMENTED => 501;
! 95: use constant HTTP_BAD_GATEWAY => 502;
! 96: use constant HTTP_SERVICE_UNAVAILABLE => 503;
! 97: use constant HTTP_GATEWAY_TIME_OUT => 504;
! 98: use constant HTTP_INSUFFICIENT_STORAGE => 507;
! 99:
! 100:
! 101: sub rflush {
! 102: my $r = shift;
! 103:
! 104: $r->flush;
! 105: }
! 106:
! 107:
! 108: 1;
! 109: __END__
! 110:
! 111: =head1 NAME
! 112:
! 113: nginx - Perl interface to the nginx HTTP server API
! 114:
! 115: =head1 SYNOPSIS
! 116:
! 117: use nginx;
! 118:
! 119: =head1 DESCRIPTION
! 120:
! 121: This module provides a Perl interface to the nginx HTTP server API.
! 122:
! 123:
! 124: =head1 SEE ALSO
! 125:
! 126: http://nginx.org/en/docs/http/ngx_http_perl_module.html
! 127:
! 128: =head1 AUTHOR
! 129:
! 130: Igor Sysoev
! 131:
! 132: =head1 COPYRIGHT AND LICENSE
! 133:
! 134: Copyright (C) Igor Sysoev
! 135: Copyright (C) Nginx, Inc.
! 136:
! 137:
! 138: =cut
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>