pscott-au / WebService-GoogleAPI-Client

Perl WebService::GoogleAPI::Client Module
https://pscott-au.github.io/WebService-GoogleAPI-Client/
Other
1 stars 2 forks source link

Dial up the Mojo #10

Open pscott-au opened 5 years ago

pscott-au commented 5 years ago

The original code was based on Moo but the core OAUTH is based on a Mojolicious module. It makes much more sense to refactor out the Moo dependency and adopt a Mojo-centric OO model.

pscott-au commented 5 years ago

This isn't really critical - the author of Moo who regularly contributes to Mojo has advised that this isn't necessarily a problem and that the 2 should play nicely together. There is a question of bloat, especially if the heavier Moo functionality is not exploited.

pscott-au commented 5 years ago

As I come to learn more about Mojo I am looking to refactor the interface to make it more fluent and exploit some of the other strengths of this paradigm like non-blocking promises etc. This could allow usage such as:

$agent->api('gmail')->execute('message.send', subject=>'fnar' )->then(..
or
$agent->execute('gmail.message.send', params=>{} )->then(