I'm currently using Catalyst, a MVC Perl web framework to develop some applications. I have previously used another frameworks in another languages that allows me to run asynchronous code. Let me put an common example: Right now if I need to send 3 emails, the user makes a request, the server send the 3 emails and it return with the 'ok' message. A good approach will be, the user makes the request, and immediately returns the 'ok, your messages will be sent shortly', and in the back-end the emails are sent asynchronously.
I'm thinking on creating my own task schedule system on a database, with 'method name', 'parameters' and 'run date' as rows of a table, and then use a cron job to call the method defined en 'method name' with the parameters at the specified date.
Maybe I am reinventing the wheel here, but at the moment I didn't find any module or technique that allow me to do this type of asynchronous method invocation.
What would be the recommended way to do asynchronous method invocation in perl? The task does not necessary need to be scheduled.