Conversation
|
I don't know whether you consider the coverage thing to be a problem. Using Devel::Hide, or maybe an environment variable toggle, it might be possible to test both the XS and PP routes in the same test run. Would you like me to try to add something like that to the test suite and |
|
I don't care about coverage to that degree.
I'm not sure when I'll get a chance to review, but it seems like a good
idea.
…On Mon, May 21, 2018, 3:15 AM Toby Inkster ***@***.***> wrote:
I don't know whether you consider the coverage thing to be a problem.
Using Devel::Hide, or maybe an environment variable toggle, it might be
possible to test both the XS and PP routes in the same test run. Would you
like me to try to add something like that to the test suite and
.travis.yml?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHRaavOiWH3WtoV3W9w4jCqk9GigZMj1ks5t0mmagaJpZM4T_Why>
.
|
|
Something that I'd like to figure out before merging this is how to test with/without Class::XSAccessors. Also need to ensure the prereq is stripped back out in the dist.ini. |
|
Could do something like: my $HAS_XS = !$ENV{PERL_CLASS_TINY_PP}
&& eval { require Class::XSAccessor; 1 };And write a few test cases which do this right at the top before loading Class::Tiny: BEGIN { $ENV{PERL_CLASS_TINY_PP} = 1 };As far as declaring Class::XSAccessor as an optional dependency for Dist::Zilla, I don't know. I don't use DIst::Zilla myself, but I'm certain it can be done. |
|
I can do the dzil work, that was more a comment to self. |
|
Do you think the tests I submitted are sufficient? |
|
Sorry, haven't had a chance to look. I'm a bit underwater with $work. |
This six line addition roughly doubles the speed of any accessors that don't have a default by building them with Class::XSAccessor. It has a negligible effect on start up time and memory usage. When Class::XSAccessor is not installed, it has no effect. No extra test cases are provided because the intention is for this to have no detectable effect other than the speed-up.
Possible additional changes: adding Class::XSAccessor as a
suggestsdependency.