[MTOS-dev] Experimental Dispatcher
Hirotaka Ogawa
hirotaka.ogawa at gmail.com
Sat Feb 2 11:15:56 PST 2008
Hi,
I've tried CGI version only, and it worked well but I had to make a
little bit of modifications.
First, your modification to MT::App includes a problem, because "=="
is not a string-comparison operator (eq).
+ my %param = (ref($_[0]) == "HASH") ? %{$_[0]} : @_;
And, I uploaded several perl modules for CGI-Application-Dispatch to
'extlib' directory. The attached zip file includes all files I need
to use CGI-Application-Dispatch with MT.
Also, I modified your mtd.cgi file as like:
#!/usr/bin/perl -w
use strict;
use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
use MT::Bootstrap;
use MT::Dispatch;
MT::Dispatch->dispatch();
On Feb 2, 2008 5:23 AM, Reed A. Cartwright <reed at scit.us> wrote:
> Anybody play with this yet? What do you think?
>
>
> Reed A. Cartwright wrote:
> > Hi All,
> >
> > I've been experimenting with incorporating a dispatcher into MTOS 4.1
> > that can dispatch under CGI and FastCGI (and possible mod_perl). I've
> > gotten it to work, and I'm sharing the prototype code with the group.
> >
> > I discovered a new perl module, FCGI::Engine, that can be used as an
> > easy (and better) replacement for much of my FCGI MT-Dispatch code.
> > Additionally, I've followed some of Tim's comments and used
> > CGI::Application::Dispatch to do the actually dispatching. Although, it
> > was designed to work with CGI::Application objects, I've gotten
> > CA-Dispatch to work with MT::App objects with a minor change to
> > MT::App::new. Of course, it would make most sense to migrate MT::App to
> > CGI::Application, but it is not necessary for this demonstration.
> >
> > You can download the experimental dispatcher, mtd, from [1]. Just
> > extract it inside an mt directory. Brief instructions, and a lighty
> > config can be found in the mtd.fcgi file. More instructions on how to
> > run mtd.fcgi can be found at [2] and [3]. If you want to run the CGI
> > dispatcher, mtd.cgi, you can look at [4].
> >
> > On my test box, I'm able to access the dashboard at
> >
> > http://localhost/cgi-bin/mt/c-m-s/ (mtd fcgi)
> > http://localhost/cgi-bin/mt/mtd.cgi/c-m-s/ (mtd cgi)
> > http://localhost/cgi-bin/mt/mt.cgi (normal mt cgi)
> >
> > and comments at
> >
> > http://localhost/cgi-bin/mt/comments/ (mtd fcgi)
> > http://localhost/cgi-bin/mt/mtd.cgi/comments/ (mtd cgi)
> > http://localhost/cgi-bin/mt/mt-comments.cgi (normal mt cgi)
> >
> > This type of setup seems to have a lot of potential for development.
> >
> > [1] http://scit.us/~reed/mtd.tar.gz
> > [2] http://search.cpan.org/~stevan/FCGI-Engine-0.02/lib/FCGI/Engine.pm
> > [3]
> > http://search.cpan.org/~mramberg/Catalyst-Runtime-5.7012/lib/Catalyst/Engine/FastCGI.pm#WEB_SERVER_CONFIGURATIONS
> > [4]
> > http://search.cpan.org/~wonko/CGI-Application-Dispatch-2.12/lib/CGI/Application/Dispatch.pm
> >
>
>
> --
> *********************************************************
> Reed A. Cartwright, PhD http://scit.us/
> Postdoctoral Researcher http://www.dererumnatura.us/
> Department of Genetics http://www.pandasthumb.org/
>
> Bioinformatics Research Center
> North Carolina State University
> Campus Box 7566
> Raleigh, NC 27695-7566
>
> Cuiusvis hominis est errare, nullius nisi
> insipientis in errore perserverare. --Cicero
> _______________________________________________
> MTOS-dev mailing list
> MTOS-dev at sixapart.com
> http://www.sixapart.com/mailman/listinfo/mtos-dev
>
--
Hirotaka Ogawa makes no sense.
http://as-is.net/blog/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mtd-extlib.tar.gz
Type: application/x-gzip
Size: 30370 bytes
Desc: not available
Url : http://www.sixapart.com/pipermail/mtos-dev/attachments/20080203/524f299e/attachment-0001.gz
More information about the MTOS-dev
mailing list