[Catalyst] New Development Release on CPAN
John Napiorkowski
jjn1056 at yahoo.com
Fri Dec 27 17:34:49 GMT 2013
Hi All,
Yesterday I released the third development version of Catalyst 'Runner' on =
the heels of the second release just a few days ago. =A0This was needed bec=
ause the second release had some debugging code left in it accidentally and=
was causing installation and testing fails for people that wanted to try o=
ut the new features. =A0My apologies.
Included with this bug fix is some additional documentation around using pl=
ack middleware and one new feature that allows one to use (or to mount a ps=
gi application that uses) exception objects as described in the plack middl=
eware
https://metacpan.org/pod/Plack::Middleware::HTTPExceptions
The idea is this middleware catches exception object that match an interfac=
e and uses them to provide content or behavior like redirection. =A0Ultimat=
ely I think all the custom error handling could move to middleware, includi=
ng the default production and debug error pages. =A0This would get them out=
of the main code and let you customize the behavior without needing nasty =
plugins. =A0For this first iteration
Later on I plan to see what tools like might buy us. =A0I've always been a =
big fan of the lisp conditional approach but for now you can actually do li=
ke
=A0 use HTTP::Throwable::=A0Factory;
=A0 sub from_catalyst :Local {
=A0 =A0 my ($self, $c) =3D @_;
=A0 =A0 HTTP::Throwable::Factory->throw(MovedPermanently =3D> { location =
=3D> '/new' });
=A0 }
and it works as expected.
So the hope here is to make it easier to customize and control default for =
the various types of error pages you use.=A0
As we add more middleware we are starting to approach the point where an ar=
ray is no longer the best way to manage our included middlware. =A0Anyone o=
ut there have experience using Javascript Connect or the Rails MiddlewareSt=
ack can comment and help design a Sane API?
jnap
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20131227/06d01=
207/attachment.htm
More information about the Catalyst
mailing list