[Catalyst-dev] Re: Catalyst::Engine vs action_hash (path)
Daniel Ruoso
daniel at ruoso.com
Tue Feb 28 02:02:01 GMT 2012
> Em Qui, 2012-02-23 às 14:12 -0200, Leonardo Ruoso escreveu:
>> How a Catalyst::Engine should get the path declared by the application
>> to publish them at startup as Engine::XMPP2 did using action_hash?
To give a bit more context...
The Catalyst::Engine::XMPP2 module provides a semantical mapping
between HTTP and XMPP so that you can implement XMPP applications
using Catalyst.
There is a difference, tho. Unlike HTTP, a XMPP node needs to publish
all of its resources to the XMPP server, otherwise the message cannot
be delivered.
That being said, what C::E::XMPP2 does now is peek into action_hash to
list the publicly-visible paths provided by the application and
register those as resources with the xmpp server.
The current alternatives would be -- it seems:
1) The engine would require a configuration of all the resources to
register -- kind of cumbersome, since this would be a separate list
from the declared actions, but would comply with the new architecture.
2) Some other (I don't really know) way for the engine to discover the
publicly-available paths so that the engine can properly register
those in the xmpp server.
3) Just use the private method _action_hash and accept that this is an
unusual engine that will take some shortcuts.
What do you think?
daniel
More information about the Catalyst-dev
mailing list