Closed slobo closed 6 years ago
Thank you for your interest in the module. I have implemented a variant, that checks if the stringification operator is overloaded. Can you check please?
Works great for our use case, thanks for such a quick response!
Popular CPAN modules like
Mojolicious
providesto_string
but nottoString
. Without this change we either have to monkeypatchMojo::URL
to providetoString
, or to manually flatten objects before passing tohash2xml
.I haven't tested the change, just opening pull request to see if it's something you would be interested in accepting. I do not know performance impact of change like this, but perhaps it would be nice to also add another popular variation -
as_string
.But perhaps ideally, if there is way to detect that class has an
overload
forq{""}
, that should be used instead - is it possible to detect via XS?Thanks