Roxen.git/
server/
modules/
examples/
last.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2000-08-01
2000-08-01 15:37:40 by Johan Sundström <oyasumi@gmail.com>
1a82e14f5a84d376edef815fae1dab4027a4a966 (
33
lines) (+
33
/-
0
)
[
Show
|
Annotate
]
Branch:
5.2
MODULE_LAST refdoc.
Rev: server/modules/examples/last.pike:1.1
1:
+
inherit "module";
+
// All roxen modules must inherit module.pike
-
+
constant cvs_version = "$Id: last.pike,v 1.1 2000/08/01 15:37:40 jhs Exp $";
+
constant module_type = MODULE_LAST;
+
constant module_name = "RefDoc for MODULE_LAST";
+
constant module_doc = "This module does nothing, but its inlined "
+
"documentation gets imported into the roxen "
+
"programmer manual. You hardly want to add "
+
"this module to your virtual servers.";
+
+
int seen_requests;
+
+
mapping|int[0..1] last_resort(RequestID id)
+
//! The <pi>last_resort()</pi> method is called when all previous
+
//! modules have failed to return a response.
+
//!
+
//! The id argument is the request information object associated with
+
//! the request.
+
//!
+
//! The returned value is either zero, if you didn't handle the
+
//! request, a result mapping or the integer one, signifying that the
+
//! request should be processed again from start (used only by the
+
//! <ref>Path info support</ref> module).
+
{
+
seen_requests++;
+
}
+
+
string status()
+
{
+
return sprintf("<b>%d</b> requests have fallen through to this "
+
"module.", seen_requests);
+
}
Newline at end of file added.