Hi,
I hope this isn't a dumb question.
I want to try and create a small REST style installation and was
considering how to overcome the problem of urls in the form
http://www.myfactory.com/parts/1234
The resource after /parts could in theory be any number but you would
not want to h
ing CGI::Application::Dispatch
(warning, the latter is my module). Or you can do the same thing with Catalyst
or REST::Application.
--
Michael Peters
Developer
Plus Three, LP
>-Message d'origine-
>De : Beginner [mailto:[EMAIL PROTECTED]
>Envoyé : mardi, 27. novembre 2007 18:49
>À : modperl@perl.apache.org
>Objet : REST
>
>Hi,
>
>I hope this isn't a dumb question.
>
>I want to try and create a small REST styl
Excellent question, and very easily doable. You want to look at the
PerlTransHandler
http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlTransHandler
Issac
Beginner wrote:
> Hi,
>
> I hope this isn't a dumb question.
>
> I want to try and create a small REST st
On Nov 27, 2007 1:04 PM, Dami Laurent (PJ) <[EMAIL PROTECTED]> wrote:
> But if you don't need that complexity, you can easily do it in mod_perl :
> configure Apache with something like
>
> SetHandler modperl
> PerlResponseHandler My::Parts::Handler
>
>
> and then have your module My::
> Beginner wrote:
> > http://www.myfactory.com/parts/1234
> >
> > The resource after /parts could in theory be any number but you would
> > not want to have a for each part that existed. Rather
> > you'd want the handler responsible for /parts to check your db and
> > return either content or 400
you can also just to do:
SetHandler modperl
PerlResponseHandler My::Parts::Handler
And handle the validation of the rest of the URL within your ResponseHandler.
You could implement as much depth below /parts as you want. api calls you'll
probably want to use are
$r->
On Tue 27 Nov 2007, David Nicol wrote:
> $ENV{PATH_INFO} is available in mod_perl is it not?
Do not rely in path_info. It is computed in map_to_storage as the remaining
part of the uri after the path on disk runs out. So if /parts exists on disk
path_info is /number. Otherwise it is /parts/numbe
gt; (warning, the latter is my module). Or you can do the same thing with Catalyst
> or REST::Application.
Thanx for all the replies. I am currently reading the Catalyst docs
and leaning towards using this. Cheifly because I am storing my data
in SQLite3 and the doc suggests that this framework
HTML::Mason, Rose::DB and dhandlers are your friend.
On the face of it this is the sort of thing mod_perl should excel at.
Does it? Can you intercept requests like this one above? Which API
methods should I be looking at?
smime.p7s
Description: S/MIME cryptographic signature
10 matches
Mail list logo