develooper Front page | perl.perl5.porters | Postings from June 2010

Spell-checking

Thread Next
From:
H.Merijn Brand
Date:
June 7, 2010 00:40
Subject:
Spell-checking
Message ID:
20100607094025.32a05cf1@pc09.procura.nl
I'm non-native English, so I'm trying to find ways to improve my docs
(and thus also the spelling of it) in my modules. In that process, I
created (this morning) and used:

--8<--- http://www.xs4all.nl/~hmbrand/pod-spell-check
#!/pro/bin/perl

use strict;
use warnings;

use Test::More;
use File::Find;
use Pod::Spell::CommonMistakes qw( check_pod );

my @files = @ARGV;
@files or find (sub {
    $File::Find::dir =~ m/\bblib/ and return;
    m/\.pm$/ and push @files, $File::Find::name;
    }, ".");
s{^\./}{} for @files;

foreach my $pm (sort @files) {
    my $result = check_pod ($pm);
    my @keys = keys %$result;

    is (scalar @keys, 0, "$pm");
    @keys or next;

    diag (join "\n", map { "$_\t=> $result->{$_}" } @keys);
    }

done_testing;
-->8---

and found a few typo's in my own modules (and in DBI). Some were quite
funny. Then I thought to run that on perl. Is it OK to start fixing
these for lib/ and ext?

% pod-spell-check
ok 1 - Porting/GitUtils.pm
:

CPAN ...

not ok 14 - cpan/CGI/lib/CGI.pm
#   Failed test 'cpan/CGI/lib/CGI.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# fuctions      => functions
:
not ok 24 - cpan/CPAN/lib/CPAN.pm
#   Failed test 'cpan/CPAN/lib/CPAN.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '2'
#     expected: '0'
# sucessfully   => successfully
# informations  => information
:
not ok 54 - cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm
#   Failed test 'cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# succesfully   => successfully
:
not ok 65 - cpan/CPANPLUS/lib/CPANPLUS/Dist/MM.pm
#   Failed test 'cpan/CPANPLUS/lib/CPANPLUS/Dist/MM.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# succesfully   => successfully
:
not ok 168 - cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
#   Failed test 'cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '2'
#     expected: '0'
# seperate      => separate
# seperator     => separator
:
not ok 172 - cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm
#   Failed test 'cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# Overriden     => Overridden
:
not ok 179 - cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm
#   Failed test 'cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '2'
#     expected: '0'
# seperator     => separator
# overriden     => overridden
:
not ok 241 - cpan/IPC-Cmd/lib/IPC/Cmd.pm
#   Failed test 'cpan/IPC-Cmd/lib/IPC/Cmd.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# seperate      => separate
:
not ok 269 - cpan/Math-BigInt-FastCalc/FastCalc.pm
#   Failed test 'cpan/Math-BigInt-FastCalc/FastCalc.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# Seperated     => Separated
not ok 270 - cpan/Math-BigInt/lib/Math/BigFloat.pm
#   Failed test 'cpan/Math-BigInt/lib/Math/BigFloat.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# libary        => library
not ok 271 - cpan/Math-BigInt/lib/Math/BigInt.pm
#   Failed test 'cpan/Math-BigInt/lib/Math/BigInt.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '2'
#     expected: '0'
# seperate      => separate
# libary        => library
not ok 272 - cpan/Math-BigInt/lib/Math/BigInt/Calc.pm
#   Failed test 'cpan/Math-BigInt/lib/Math/BigInt/Calc.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# Seperated     => Separated
not ok 273 - cpan/Math-BigInt/lib/Math/BigInt/CalcEmu.pm
#   Failed test 'cpan/Math-BigInt/lib/Math/BigInt/CalcEmu.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# libary        => library
:
not ok 317 - cpan/Module-Build/lib/inc/latest.pm
#   Failed test 'cpan/Module-Build/lib/inc/latest.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# verison       => version
:
not ok 431 - cpan/Test-Harness/lib/TAP/Parser.pm
#   Failed test 'cpan/Test-Harness/lib/TAP/Parser.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '2'
#     expected: '0'
# compatability => compatibility
# COMPATABILITY => COMPATIBILITY
:
not ok 475 - cpan/Test-Simple/lib/Test/Builder.pm
#   Failed test 'cpan/Test-Simple/lib/Test/Builder.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# accessable    => accessible
:
not ok 498 - cpan/Time-Piece/Piece.pm
#   Failed test 'cpan/Time-Piece/Piece.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# overriden     => overridden
:
not ok 504 - cpan/Win32API-File/File.pm
#   Failed test 'cpan/Win32API-File/File.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# loggin        => login
:


DIST ...

not ok 564 - dist/ExtUtils-Install/lib/ExtUtils/Install.pm
#   Failed test 'dist/ExtUtils-Install/lib/ExtUtils/Install.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# dont  => don't
:
not ok 626 - ext/B/t/OptreeCheck.pm
#   Failed test 'ext/B/t/OptreeCheck.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# dont  => don't
:
not ok 653 - ext/VMS-DCLsym/DCLsym.pm
#   Failed test 'ext/VMS-DCLsym/DCLsym.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# reenabled     => re-enabled
:
not ok 662 - ext/mro/mro.pm
#   Failed test 'ext/mro/mro.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# precendence   => precedence
:
not ok 704 - lib/Search/Dict.pm
#   Failed test 'lib/Search/Dict.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# correponding  => corresponding
:
not ok 721 - lib/UNIVERSAL.pm
#   Failed test 'lib/UNIVERSAL.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '1'
#     expected: '0'
# overriden     => overridden
:
not ok 755 - os2/OS2/OS2-Process/Process.pm
#   Failed test 'os2/OS2/OS2-Process/Process.pm'
#   at /pro/bin/pod-spell-check line 21.
#          got: '2'
#     expected: '0'
# appearence    => appearance
# childs        => children
:
1..768
# Looks like you failed 25 tests of 768.



-- 
H.Merijn Brand  http://tux.nl      Perl Monger  http://amsterdam.pm.org/
using 5.00307 through 5.12 and porting perl5.13.x on HP-UX 10.20, 11.00,
11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About