pullingshots / Shipment

Perl interface into various shipping web service API's - FedEx, UPS, Purolator, Temando, Canada Post
https://metacpan.org/pod/Shipment
19 stars 19 forks source link

port from Moose to Moo #32

Closed SysPete closed 9 years ago

SysPete commented 9 years ago

Hi Andrew

Was wondering if you'd be interested in moving Shipment from Moose to Moo so I thought I'd rehack the code and do a PR. I don't have any accounts with any of the shippers so most of the tests have not been run against my changes. I'f you're interested in this commit then I'll see if I can get some accounts and test properly.

racke commented 9 years ago

Yeah!!!

hexfusion commented 9 years ago

+1

pullingshots commented 9 years ago

Wow! Thanks Pete!

I ran all of the tests and only came up with 1 issue with t/purolator.t

coercion for "eta" failed: Undefined subroutine &Shipment::Service::blessed called at /home/baerg/Shipment/lib/Shipment/Service.pm line 138

Any ideas? Shoot me an email - andrew at pullingshots.ca - and I can hook you up with a test account for Purolator

SysPete commented 9 years ago

My bad - missing module now required in Service via latest commit.

Those coercions are pretty ugly but sadly the MooX DateTime type doesn't hide that magic away the way the previous Moose module did. Will send you an email regarding test account then I can be sure this stuff really works as expected.

SysPete commented 9 years ago

Purolator tests now run fine with new coerce_datetime sub added in 1b56cf8. I'm not sure I really like having this sub in Base and then using it from Service: maybe a new package should be added though really it would mostly be for aesthetics.