Mojolicious v7.49 took us by surprise because of the changes to 
Mojo::IOLoop::Delay.

We have a fairly large code base dealing extensively with gathering data 
from a wide variety of back end systems (for displaying in a web portal).

Replacing the catch() method with the new one which does not receive the 
delay object as first param appears to be mostly just an inconvenience, as 
it requires some manual effort to adapt the existing code but no 
modification of the abstract workflow logic.

The deprecation of "data" and "remaining" on the other hand could be a real 
problem for us.

We have a bunch of classes for different back end systems, a starting point 
and a defined end point. 
The classes for the different back ends define the steps needed to gather 
all necessary data from the respective back end to reach the generic end 
point. The steps (callbacks) retrieved are then inserted in our M:I:Delay 
object.
Only the input the respective step callback specifically needs is passed as 
explicit parameters to it; everything else travels by in delay->data.

When retrieving the starting point data from a back end it sometimes 
includes references to other objects. 
We keep most of the response data around in the "data" attribute of the 
delay and start harvesting the referenced data, which we need to have 
around before continuing to the original second step.
For this we prepend new steps like this:

$delay->steps( @new, @{$delay->remaining} );

The final step can be quite generic, taking everything it needs out of the 
$delay->data, processing it as required and passing it back to the main 
application.

When implementing M:I:Delay::data and M:I:Delay::remaining something like 
this must have been the intended use case. 
Now we wonder if someone could describe the recommended way for 
re-implementing these use cases without "data" and "remaining".

Thx
Heiko

-- 
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 https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to