preaction / Log-Any

Simple, fast Perl logging API compatible with any logging system
Other
13 stars 19 forks source link

Overloaded stringification #49

Closed mephinet closed 8 years ago

mephinet commented 8 years ago

This patch uses overload::OverloadedStringify to detect whether a reference has its own stringification - cf https://metacpan.org/source/RJBS/perl-5.24.0/lib/overload.pm#L88 If it has, it will be used instead of using Data::Dumper.

This patch would fix #48.

preaction commented 8 years ago

It looks like this is having problems when URI isn't installed. It might be better to inline a package with an overload that you can use right in the test.

mephinet commented 8 years ago

Yes, you are right - the final version of the unit test should not use none-core modules - I'll check if I find a better example in core that shows the same behavior... Furthermore, we need to check whether OverloadedStringify is available in all versions of Perl that you support, and decide whether you are fine with using it given that it's not documented in the overload POD...

mephinet commented 8 years ago

As suggested, I replaced the dependency to URI with an inline package.

preaction commented 8 years ago

Excellent! Thank you. I will push out a dev release for CPAN Testers right now, and announce people to test it tomorrow.

mephinet commented 7 years ago

Any idea why your release wasn't picked up by the CPAN testers yet? http://matrix.cpantesters.org/?dist=Log-Any+1.043-TRIAL

preaction commented 7 years ago

Because cpantesters has been catching up from a 2-week stint of downtime. The "fast matrix" uses the incoming Metabase directly: http://fast-matrix.cpantesters.org/?dist=Log-Any%201.043-TRIAL

mephinet commented 7 years ago

Ah, I wasn't aware of that (2 weeks on vacation B-) - so all good from this point of view, great!

preaction commented 7 years ago

1.045 (stable) is now released to CPAN. Thanks for all your help!