[Catalyst] Continuations anyone? :)

Matt S Trout dbix-class at trout.me.uk
Sat Apr 22 16:44:27 CEST 2006


Dave Hodgkinson wrote:
> On 21 Apr 2006, at 12:07, Sebastian Riedel wrote:
> 
>> Yea, maybe i've been playing too much with Seaside,
>> but here is an example for a (fake) continuation plugin. =)
>>
>> Since Perl5 doesn't support real continuations we can just serialize
>> the action object,
>> but thats enough to have a lot of fun.
> 
> I guess this is a "if you don't know what Seaside is or what
> Continuations are, you shouldn't be playing with it"?

http://www.madore.org/~david/computers/callcc.html

isn't a bad quick explanation, provided you don't mind a little scheme code.

The Coro::Cont module is sort-of close to a real continuation, although the 
way it implements it isn't really right and as such you can only re-invoke the 
continuation once (which takes away most of the fun :)

There's also some ancient code of mine at

http://dev.catalyst.perl.org/trac/bast/browser/trunk/historical/rev1/r2

which illustrates using continuations in Inline::Guile code to allow you to 
write (apparently) synchronous code which then runs asynchronously on top of a 
POE kernel.

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Catalyst mailing list