Skip Menu |

This queue is for tickets about the Test-Spelling CPAN distribution.

Report information
The Basics
Id: 56483
Status: resolved
Priority: 0/
Queue: Test-Spelling

People
Owner: Nobody in particular
Requestors: daxim [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.11
Fixed in: (no value)



Subject: sh: spell: not found
Test::Spelling should try harder to find a spell-checking program on its own. Candidate list: `aspell list -l en` `ispell -l` `spell`
On Sun Apr 11 10:00:00 2010, DAXIM wrote: Show quoted text
> Test::Spelling should try harder to find a spell-checking program on
its Show quoted text
> own. Candidate list:
and hunspell
Further, if the user doesn't have any spellchecker installed, Test::Spelling should do anything other than die. I just tried to install something depending on it and got a failure because the machine I'm installing on is minimal and doesn't have a spellchecker installed. It should probably SKIP tests in that case, not die.
Subject: Re: [rt.cpan.org #56483] sh: spell: not found
Date: Mon, 31 Jan 2011 16:25:47 -0500
To: bug-Test-Spelling [...] rt.cpan.org
From: Ivan Tubert-Brohman <itub [...] cpan.org>
Hi, I'm the admittedly neglectful author of this module. I'm not actively maintaining this module anymore. If someone is interested in taking ownership, please let me know and I'll be happy to do the transfer. That said, I've always strongly urged that authors NOT include a spelling test in their distributions. By all means, run the test locally while you are developing your module, but please exclude it from the manifest so users who try to install your module don't try to run the spelling test. The reasons are twofold: 1) It doesn't make sense for the user to run a spelling test. It is not plausible that a spelling test will *correctly* work for the developer but not for the user. The installation process should not introduce typos. If it is doing that, you have a bigger problem. 2) Even worse, spelling tests are likely to fail when users run them. Not only because they might lack the spellcheck program as discussed in this ticket, but also because they might be using a different dictionary. The only way to avoid this problem would be to wrap a spellcheck program AND dictionary with your module. But as mentioned in 1), there is no good reason for the user to run the test anyway. Cheers, Ivan
Hi Lars, Caleb, and Chris, I've taken over maintenance of Test::Spelling. In the upcoming 0.12 I've added logic to try alternative spellcheckers in this order: spell aspell list -l en ispell -l hunspell -l I'm not convinced this is a stellar idea, because each of these programs is going to want to use its own dictionary, which will have slightly different lists of words. However, I'm going forward with it because the developer can trivially force her spellcheck program of choice using set_spell_cmd (which, when set, will not use the above alternatives at all). As far as not having a spellchecker installed at all, I completely agree with Ivan that having end-users run spellcheck tests during CPAN module installation is wrong. It's a bug in whatever module is using Test::Spelling - such tests should be guarded by an "if $AUTHOR" check. That said, I've gone ahead and implemented the skip_all logic if you do not appear to have a working spellchecker. This only comes into play if you use all_pod_files_spelling_ok, which is the only function that actually declares a plan for you. For anyone not using all_pod_files_spelling_ok, I've added a has_working_spellchecker function which lets you know whether you should skip your tests. Shawn