summaryrefslogtreecommitdiff
path: root/fml/lib
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-02-28 03:52:22 +0000
committerfukachan <fukachan>2001-02-28 03:52:22 +0000
commitfe289b22fe0a2446c281d2ede4b71118ff92abac (patch)
treeff997bf6bf2fcd5546514422a62c6019d17e5252 /fml/lib
parentb2fc1c04963b15986a14de29357065177d39af2f (diff)
downloadfml8-fe289b22fe0a2446c281d2ede4b71118ff92abac.tar.gz
fml8-fe289b22fe0a2446c281d2ede4b71118ff92abac.tar.bz2
fml8-fe289b22fe0a2446c281d2ede4b71118ff92abac.zip
add & enable fmlticket.cgi
Process::CGI is the base class for several CGI scripts details are in FML::CGI:: classes.
Diffstat (limited to 'fml/lib')
-rw-r--r--fml/lib/FML/Process/CGI.pm85
-rw-r--r--fml/lib/FML/Process/Switch.pm10
2 files changed, 93 insertions, 2 deletions
diff --git a/fml/lib/FML/Process/CGI.pm b/fml/lib/FML/Process/CGI.pm
new file mode 100644
index 00000000..bd22cb5e
--- /dev/null
+++ b/fml/lib/FML/Process/CGI.pm
@@ -0,0 +1,85 @@
+#-*- perl -*-
+#
+# Copyright (C) 2001 Ken'ichi Fukamachi
+# All rights reserved. This program is free software; you can
+# redistribute it and/or modify it under the same terms as Perl itself.
+#
+# $Id$
+# $FML$
+#
+
+package FML::Process::CGI;
+use strict;
+use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
+use Carp;
+
+=head1 NAME
+
+FML::Process::CGI - CGI basic functions
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+=head1 METHODS
+
+=head2 C<new()>
+
+=cut
+
+use FML::Process::Kernel;
+use FML::Log qw(Log);
+use FML::Config;
+
+# load standard CGI routines
+use CGI qw/:standard/;
+
+@ISA = qw(FML::Process::Kernel Exporter);
+
+
+sub new
+{
+ my ($self, $args) = @_;
+ my $type = ref($self) || $self;
+ my $curproc = new FML::Process::Kernel $args;
+ return bless $curproc, $type;
+}
+
+
+# XXX FML::Process::Kernel::prepare() parses incoming_message
+# XXX CGI do not parse incoming_message;
+sub prepare
+{
+ my ($curproc) = @_;
+ my $config = $curproc->{ config };
+ my $charset = $config->{ cgi_charset } || 'euc-jp';
+
+ print header(-type => "text/html; charset=$charset");
+}
+
+
+# dummy methods
+sub verify_request { 1;}
+sub finish { 1;}
+
+
+=head1 AUTHOR
+
+Ken'ichi Fukamachi
+
+=head1 COPYRIGHT
+
+Copyright (C) 2001 Ken'ichi Fukamachi
+
+All rights reserved. This program is free software; you can
+redistribute it and/or modify it under the same terms as Perl itself.
+
+=head1 HISTORY
+
+FML::Process::CGI appeared in fml5 mailing list driver package.
+See C<http://www.fml.org/> for more details.
+
+=cut
+
+
+1;
diff --git a/fml/lib/FML/Process/Switch.pm b/fml/lib/FML/Process/Switch.pm
index 6ec2bd6c..132e03f8 100644
--- a/fml/lib/FML/Process/Switch.pm
+++ b/fml/lib/FML/Process/Switch.pm
@@ -154,7 +154,7 @@ sub _module_specific_options
$myname eq 'loader' ) {
return qw(ctladdr! debug! params=s -c=s);
}
- elsif ($myname eq 'fmlticket') {
+ elsif ($myname eq 'fmlticket'|| $myname eq 'fmlticket.cgi') {
return qw(debug! params=s -c=s -A=s -R=s);
}
elsif ($myname eq 'fmlconf') {
@@ -164,7 +164,7 @@ sub _module_specific_options
return qw(ctladdr! debug! params=s -c=s n!);
}
else {
- croak "$myname is not defined.\n";
+ croak "options for $myname are not defined.\n";
}
}
@@ -176,6 +176,9 @@ sub _ml_name_is_required
if ($myname eq 'fmldoc') {
return 0;
}
+ elsif ($myname eq 'fmlticket.cgi') {
+ return 0;
+ }
else {
return 1;
}
@@ -206,6 +209,9 @@ sub _module_we_use
elsif ($name eq 'fmlconf' || $name eq 'fmldoc' || $name eq 'makefml') {
$pkg = 'FML::Process::Configure';
}
+ elsif ($name eq 'fmlticket.cgi') {
+ $pkg = 'FML::CGI::TicketSystem';
+ }
elsif ($name eq 'fmlticket') {
$pkg = 'FML::Process::TicketSystem';
}