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

Was Crash on using Data::Dump - now refine logging/warning and return values #9

Open rabbiveesh opened 6 years ago

rabbiveesh commented 6 years ago

While attempting to authenticate using goauth, I encountered a crash, because the program couldn't, quote [error] Can't call method "pp" on unblessed reference at /home/veesh/perl5/bin/goauth line 153.

It seems like you switched from Data::Dumper to Data::Dump at some point, and the latter doesn't export pp() by default. Changing the 'use' line to use Data::Dump qw/pp/; solves the issue.

This seemed a drop small to make a pull request on, so I'm posting this issue here. I'm excited to use this module, and I'll be happy to help improve it however I can.

pscott-au commented 6 years ago

Many thanks @rabbiveesh - fixed in efe8a90c5b68f6989ea0717bce21cfd5b7ea10fd I only discovered Data::Dumper pp recently - ideally shouldn't be using Dumper for warnings etc - expect that will refactor this out shortly with a better logging / warning approach.

I'm working on this module pretty actively so if you have ideas for things to improve or examples you'd like to see working don't hesitate to create an issue or email me directly.

pscott-au commented 6 years ago

eek - silly me had repeated the same problem through a lot of the libs .. fixed in 0.20 .. intention is to remove data dumpas from carps .. also make subs more reliable .. they should return something when they fail and not croak etc. have always kinda struggled with the return structs with status but hopefully get something together that's sane soonl

pscott-au commented 6 years ago

I believe that this matter is no longer presenting. Am leaving this open to track a broader objective of refining the return value and logging to make more robust.