Thinking about this more...

A plugin needs to be generic. I can't write a generic info routine as
exampled below without providing a cb to explain to info what to do with
its result or else the process will block. (I hope I have that right.) And
therefore I might as well just use UA because what's the difference at that
point??

So, the solution is not to write a plugin but instead an app module for
doing the more specific operations that I need the app to do.

For couchdb, there is nothing that I or anyone else can do for the Mojo
community. Correct?
On Dec 17, 2013 10:55 AM, "Stefan Adams" <[email protected]>
wrote:

>
> On Dec 17, 2013 10:29 AM, "Adam McLean" <[email protected]> wrote:
> >
> > Although maybe contributing to the Mojolicious core would be a better
> use of time!
>
> Ha! With the reputation I've likely built up for myself on this list I
> doubt that will ever happen. :D
>
> But I would like to. Just need to better understand the framework. CouchDB
> plugin was first useful thing I could think of that could enable me an
> opportunity to learn by doing.
>
> Thanks for your advice. With respect to your advice on just using UA, my
> thought was to build a plugin for cleaner code -- code refactoring.
>
> Take for example the sample gist I posted. What if my app needed to call
> http://localhost:5984/ to query the version and it needed to do that in a
> dozen different routes? Surely I shouldn't write the same ua-> get
> statement in every route. It gets messy and is too repetitive. Therefore it
> made sense to me to factor that out into a plugin.
>
> What do you think?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to