[Catalyst] Catalyst::Controller::REST and JSON::XS -
Namespace/Custom modules
Simon Zmijanow
hrubaba at gmail.com
Sun Mar 16 21:27:54 GMT 2008
Hello list,
Started last month with Catalyst and got fascinated with all the nice
things one can do with it.
But now got a little question and hope it is not too stupid :-)
I must admit, I don't have a clue how to cleanly load my custom
module/class into the frameworks namespace (anywhere, not only into the
Schema part)
I'm using Catalyst::Controller::REST in my application and want to use
JSON::XS serializer instead of default JSON::Syck (By the way, why is
Syck still default x-json serializer - even the comment in Syck advises
us to change to more reliable XS)
So I copied the two JSON wrappers from Action directory into my
application dir, modified them to use JSON::XS and renamed them into
JSONXS. The Catalyst::Controller::REST got config option map 'JSONXS'.
Now I should tell somehow catalyst to use my new classes, to load them
from my application dir, maybe the way similar like the DBIC Schema
Class by calling load_classes(). Is there trivial or documented way to
accomplish this within other part of catalyst i.e. Controller?
For now I added my new JSONXS wrappers into Action subdirs of catalyst
root, but I regard it more as temporary hack then good solution for
custom serializer.
cu
-=-=-=-=-=-=oO:>
simon zmijanow
More information about the Catalyst
mailing list