Open pplu opened 8 years ago
@pplu Do you have any plans to use Type::Standard instead of Moose types and break out of Moose? (Yes, Moo is better)
Hi,
I'm open to using these modules. I think it's a step in the right direction. Notice that breaking completely out of Moose is a bit harder (since the parts that convert a method call into a call object, call object into an HTTP request, and the HTTP response in to objects use the MOP to introspect the classes, assisting these transformations.
I'd be very happy to accept PRs in this direction and offer assistance into helping this start to get going.
I think it's very unlikely and undesired to move Paws to Moo anytime soon because of the heavy reliance on the metaprotocol, but switching to Type::Tiny should be easily doable.
Just for the file if anyone wants to pursue this item. I've developed a couple of other REST client libraries only depending on Moo (to get a feel of how it could be done in Paws).
Kubernetes::REST is Moo-only. The generated classes have this structure: https://github.com/pplu/kubernetes-rest/blob/master/auto-lib/Kubernetes/REST/Call/v1beta2/Apps/ReadNamespacedStatefulSet.pm
The code that converts the object to an HTTP Request is like this: https://github.com/pplu/kubernetes-rest/blob/master/lib/Kubernetes/REST/ListToRequest.pm
From discussion in #107:
Use of Type::Library and Type::Standard instead of Moose core types is recommended by Perl community. It would be nice to try them out vs standard Moose types
A speed / memory usage comparison would be great between these type checking libraries to make the change definitive.