exercism/perl5

Add instructions for installing Test2::Suite

m-dango opened this issue ยท 10 comments

cpm install -g Test2::Suite, or cpm install Test2::Suite if local installation is necessary.
libtest2-suite-perl package for system Perl on Ubuntu/Debian.
perl-test2-suite package for system Perl on Arch.

Created the first draft for discussion and eventually PR.

https://github.com/rfilipo/perl5/blob/test2-v0/docs/INSTALLATION.md

kotp commented

Very nice, can you create a pull request for this?

Sure, I will include the commands proposed by @mienaikage in the section "Other Options".

On Debian stable the libtest2-suite-perl package doesn't contain the Test2::V0 module. The backports package does however, and can be installed by following the instructions found here: https://backports.debian.org/Instructions/

I'm not hugely familiar with CentOS but the following seems to set things up correctly:

sudo yum install centos-release-scl
sudo yum install rh-perl526 rh-perl526-perl-Test2-Suite
scl enable rh-perl526 bash

Ok, I will analyze it, realize what's the best way and fix the PR #279. Thank you, @mienaikage.

Done, please, check when you have time. Thanks!

@rfilipo re: your comments in PR #279

Test2::Suite will be used for all exercises, the changes in question are all in branch https://github.com/exercism/perl5/tree/test2-more , however they have not been applied as we need to have the instructions first!

I agree with splitting up the PR, it should be easier to work on different parts of the documentation that way.

As for a package manager, installing one might not be necessary for everyone. After Test2::Suite is applied the only non-core dependency left on this track will be DateTime. It's only used by 2 exercises and shouldn't be too hard to either substitute or remove.

Thanks, @mienaikage . If you agree, I think we can begin with Test2::Suite just in some exercises, like Grains, when we can teach something about installing modules, the Perl Toolchain, CPAN, CPAN clients, etc. What do you think?

I think when it comes to teaching about installing modules, perhaps a class-like exercise e.g. clock would be a better candidate. We could recommend starting out with something like Object::Tiny, and also suggest exploring Moo(se).

As for using Test2::Suite only in select exercises, I don't agree and think we should try to stick to using one. It allows for consistent behaviour for users running the tests, and I suspect it could make exercises more difficult to maintain if they use different methods for testing.

Introducing users to modules, the toolchain, CPAN etc is something I would definitely like, but I feel like these would be better as optional things we can suggest users explore, rather than making them integral parts of the track.