• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

t/H21-Sep-2007-15895

Aspell.pmH A D21-Sep-200710.9 KiB3578

Aspell.xsH A D03-May-200712.4 KiB518366

ChangesH A D21-Sep-20073.9 KiB12075

MANIFESTH A D03-May-2007177 1211

META.ymlH A D21-Sep-2007337 1210

Makefile.PLH A D03-May-2007249 1310

READMEH A D03-May-200710 KiB301188

typemapH A D03-May-2007704 2618

README

1Text::Aspell - Perl interface to the Aspell library
2
3DESCRIPTION
4
5Text::Aspell is an interface to the GNU Aspell library.  GNU Aspell is a Free
6and Open Source spell checker.  The Text::Aspell module is a thin XS wrapper
7around the Aspell C Library.
8
9REQUIREMENTS
10
11Hopefully this is obvious, but you MUST have the Aspell library installed on
12your system before installing this module.  You also MUST have the en_US
13dictionary installed for "make test" to pass.
14
15For example, if you are running Debian you would have done this first:
16
17    # apt-get install aspell-en libaspell-dev
18
19which would install the aspell binary and dictionary, plus also
20the aspell library and header file which are needed to link this module against.
21
22If you installed GNU Aspell from source then you should have the the aspell.h and
23aspell library on your system.
24
25Take a look at the bug reports for Aspell:
26
27    http://cpantesters.perl.org/show/Text-Aspell.html#Text-Aspell-0.05
28
29Note how many either say:
30
31    Aspell.xs:7: aspell.h: No such file or directory
32
33or:
34
35    #     Failed test (t/05-core.t at line 33)
36    #          got: 'en_GB'
37    #     expected: 'en_US'
38    # Really need the en_US dictionary installed!
39
40Makefile.PL does not do any checking of of Aspell before building.  I would welcome
41any help updating the build process to do more checking up front.
42
43
44
45See BUILD NOTES and CURRENT ISSUES below before reporting any bugs.
46
47
48This module has been built and passed all tests on the following platforms:
49
50    perl 5.6.1 on Linux, gcc version 2.95.3 20010315 (release)
51    perl 5.8.0 on Linux gcc version 2.95.4 20011002 (Debian prerelease)
52    perl 5.00503 on FreeBSD 4.6-STABLE gcc version 2.95.4 20020320 [FreeBSD]
53
54    (these require at least aspell-0.50.1)
55    perl 5.00503 on Solaris 5.8 sparc SUNW,Ultra-60 gcc version 2.95.2 19991024 (release)
56    perl 5.00503 on Solaris 2.6, gcc version 2.95.1 19990816 (release)
57
58And on Wed Jul 27 10:36:12 PDT 2005:
59
60    perl 5.8.7, Aspell 0.60.3, gcc 3.3.6 Debian Sid
61    perl 5.8.7  Aspell 0.60.3, gcc 3.4.2 FreeBSD 5.4-STABLE i386
62
63
64And on Fri May 26 18:59:51 UTC 2006 with Text-Aspell-0.06
65
66    perl  5.8.8, Aspell 0.60.4, aspell6-en-6.0.0  Debian Sid gcc 4.0.3 (all from source)
67    perl  5.8.4, Aspell 0.60.4, aspell6-en-6.0-0, Debian GNU/Linux 3.1 gcc  3.3.5 (all from source)
68    perl  5.8.8, Aspell 0.60.4, FreeBSD 6.1-RELEASE #0, gcc 3.4.4 (Aspell from ports)
69
70
71
72
73
74Please read SUPPORT below if you have trouble building Text::Aspell.
75
76
77INSTALLATION
78
79Windows users see below.
80
811) Install Aspell and a Dictionary
82
83    Make sure you have a current version of GNU Aspell installed.
84    You must install both the Aspell program and a dictionary.
85    They are distributed as separate packages.
86
87    (Look at all the FAILED reports on CPAN from people that don't have Aspell
88    installed!)
89
90    Aspell and the dictionary files can be downloaded from:
91
92    http://aspell.net/
93
94    Note: The Text::Aspell module's test suite ("make test") requires
95    that the English dictionary is installed.
96
97    This module has been tested with the following version of Aspell
98    and dictionary:
99
100        aspell-0.50       Aspell program (ftp://ftp.gnu.org/gnu/aspell/aspell-0.50.tar.gz)
101        aspell-en-0.50-1  English Dictionary (ftp://ftp.gnu.org/gnu/aspell/aspell-en-0.50-1.tar.bz2)
102
103    NOTE: URLs for reference only -- use the most current version of each available.
104
105    Aspell and the dictionary packages contain README files that include
106    installation instructions.  Here's a basic overview:
107
108    Aspell must be installed first, then install the dictionary file and finally
109    install the Text::Aspell module.
110
111    Aspell installation example:
112
113    $ wget ftp://ftp.gnu.org/gnu/aspell/aspell-0.50.tar.gz
114    $ tar zxof aspell-0.50.tar.gz           # or gzip -dc aspell-0.50.tar.gz | tar xof -
115    $ cd aspell-0.50
116    $ ./configure ( ./configure --help for options )
117    $ make
118    # make install
119
120    If you used a --prefix option to install Aspell in a non-standard location you
121    will need to adjust your path to include $PREFIX/bin.  The configure script
122    for the dictionary needs to find programs installed in the previous step.
123
124    Dictionary installation example:
125
126    $ wget ftp://ftp.gnu.org/gnu/aspell/aspell-en-0.50-1.tar.bz2
127    $ tar jxof aspell-en-0.50-1.tar.bz2     # or bunzip2 < aspell-en-0.50-1.tar.bz2 | tar xof -
128    $ cd aspell-en-0.50-1
129    $ ./configure
130    $ make
131    # make install
132
133    At this point you should be able to run Aspell in interactive mode.
134    For example:
135
136    $ aspell -a
137    @(#) International Ispell Version 3.1.20 (but really Aspell 0.50)
138    speler
139    & speler 30 0: speller, speer, spiller, spoiler, ...
140
141
1422) Build and install this Text::Aspell module.
143
144    $ perl Makefile.PL
145    $ make
146    $ make test
147    # make install
148
149
150    If you installed Apsell in a non-standard location (for example, if
151    you don't have root access) then you will need to tell Makefile.PL where to
152    find the library.
153
154    For example, if Apsell was installed in $HOME/local (--prefix=$HOME/local)
155    and the perl module should be installed in the perl library $HOME/perl_lib:
156
157    $ perl Makefile.PL PREFIX=$HOME/perl_lib \
158    CCFLAGS=-I$HOME/local/include \
159    LIBS="-L$HOME/local/lib -laspell"
160
161    $ LD_RUN_PATH=$HOME/local/lib make
162    $ make test
163    $ make install
164
165
166
167WINDOWS USERS
168
169Randy Kobes has provided a PPM and the following instructions for installing
170Text::Aspell on Windows.  Thanks very much Randy.
171
172For installing on Win32, first get and install the "Full installer"
173executable at
174
175   http://aspell.net/win32/
176
177this will install Aspell into a location such as C:\Program Files\Aspell. You
178will also need to fetch and install at least one of the precompiled
179dictionaries found on the same page.
180
181Make sure that the path to the Aspell bin directory (e.g. C:\Program
182Files\Aspell\bin\) is in your PATH environment variable.  For help with
183setting your path see "set environment variables" in the Windows Help
184Utility.  You may need to reboot or open a new shell window after setting
185your path.  The Aspell .dll file must be located in the PATH before using
186Text::Aspell.
187
188Then, to install Text::Aspell, type at a DOS prompt (all on one line)
189
190   C:\> ppm install http://theoryx5.uwinnipeg.ca/ppms/Text-Aspell.ppd
191
192for an ActivePerl 8xx version, or
193
194   C:\> ppm install http://theoryx5.uwinnipeg.ca/ppmpackages/Text-Aspell.ppd
195
196for an ActivePerl 6xx version.
197
198If you wish to build Text::Aspell from source:
199
200If you want to build Text::Aspell yourself, you'll need a C compiler, which
201must be the same one that your Perl is built with (for ActivePerl, this means
202VC++ 6). Assuming you have that, in addition to the "Full installer" binary
203package at http://aspell.net/win32/, you'll also need to get and install the
204aspell-dev package (also located at http://aspell.net/win32/), which contains
205the necessary .lib and .h files needed to compile the Perl module.
206
207Like above, make sure the PATH environment variable points to the location of
208the installed Aspell .dll file before building Text::Aspell.
209
210Installation then proceeds as described for the Unix version:
211
212   perl Makefile.PL
213   nmake
214   nmake test
215   nmake install
216
217with the additional requirement of passing to 'perl Makefile.PL' the
218necessary arguments (e.g. INC and LIBS) to specify the locations of the lib
219and header files, if these were installed in a non-standard location. Make
220sure that if a non-standard location was used that this is added to your PATH
221environment variable before running the tests.
222
223
224SUPPORT
225
226Before contacting me with problems building Text::Aspell please try and debug
227as much as possible.
228
229For example, if "make test" fails, then run in verbose mode:
230
231   make test TEST_VERBOSE=1
232
233That may show at what test is failing.  It's easy to run the test
234script manually -- and you can even edit and add a few print statements to
235aid in debugging.
236
237For example:
238
239   perl -Iblib/lib -Iblib/arch t/test.t | less
240
241Use of LD_RUN_PATH, CCFLAGS and LIBS as above may also help if the build
242process fails.
243
244Remember that you *must* have the English dictionary installed for tests to
245pass (sorry, have to check against some dictionary).  Also, you may need to
246set your LANG variable to "en_US" so that the English dictionary is selected.
247
248If all else fails, use the request tracker at:
249
250  http://rt.cpan.org/NoAuth/Bugs.html?Dist=Text-Aspell
251
252
253BUILD NOTES / CURRENT ISSUES
254
255A number of people have reported the
256
257    $speller->store_replacement()
258
259test failing on some platforms.  I don't know why.  Search google to find out
260why I don't know why.  The code (from what I can tell) looks like it should be
261returning an error value, but fails on some platforms.  Until I can get a
262better answer I'm going to assume Aspell is broken and ignore the return value
263in t/test.t.  So don't test the return value in your code, either.
264
265Update May 2006:  Changed from checking return values to calling aspell_*_error
266method to test for errors.
267
268
269Some users of OS X have reported the test failing after calling clear_session().
270The test is suppose to see if a word added to the session is removed after calling
271clear_session().  It's another error I have not been able to reproduce on the machines
272I tested on.
273
274
275"Pax" provided these notes:
276
277    I just got Text::Aspell to build and work under OpenBSD 3.7 and thought you
278    might like a tiny suggestion: in the README, you might note that under this
279    operating system you need to add -lstdc++ to the list of libraries you link
280    against, e.g.:
281
282            $ perl Makefile.PL \
283                   PREFIX=/usr/local INSTALLDIRS=site \
284                   CCFLAGS=-I/usr/local/include \
285                   LIBS="-L/usr/local/lib -laspell -lstdc++"
286
287    If you don't do this, then any attempt to use Text::Aspell will throw
288    thousands of unresolved symbol errors trying to load your shared object.
289    This is against libaspell in /usr/local/lib installed from the aspell
290    port in the OpenBSD 3.7 ports tree, FWIW.
291
292
293A number of Solaris uses have reported the need to set:
294
295    LDFLAGS='-L/usr/local/lib -R/usr/local/lib'
296
297and also having to copy libstdc++* to /usr/lib.  YMMV.
298
299
300
301