in reply to Re^3: Installing tesseract on XP
in thread Installing tesseract on XP

I ran the code and received:

"all" is not defined in %Image::OCR::Tesseract::EXPORT_TAGS
at t2.pl line 3
main::BEGIN() called at C:/Perl/site/lib/Image
/OCR/Tesseract.pm line 3
eval {...} called at C:/Perl/site/lib/Image
/OCR/Tesseract.pm line 3
Can't continue after import errors at t2.pl line 3
BEGIN failed--compilation aborted at t2.pl line 3.

Replies are listed 'Best First'.
Re^5: Installing tesseract on XP
by syphilis (Archbishop) on Jun 25, 2009 at 09:28 UTC
    "all" is not defined

    If you've followed the link supplied by Anonymous, then you've run the test script for version 1.20 of the module. But you probably have an older version of Image::OCR::Tesseract - one that apparently doesn't define the tag "all".

    Any chance that you can update to the latest version of the module ? Looks like it's a pure perl module, so this is probably as simple as grabbing Tesseract.pm from http://search.cpan.org/src/LEOCHARRE/Image-OCR-Tesseract-1.20/lib/Image/OCR/Tesseract.pm and sticking it in your perl/site/lib/Image/OCR folder (overwriting the existing Tesseract.pm).

    Then try the test script again. (That test script might need to be able to locate other files from the source distro - you can get the entire source distro from http://search.cpan.org/~leocharre/Image-OCR-Tesseract-1.20/)

    Cheers,
    Rob
      I did have an older version, it was the only one I could find via PPM. I uninstalled it and attempted to install 1.20, but perl Makefile.pl gives me:
      The system cannot find the path specified. Cannot find tesseract executable.

      I have tesseract.exe working from the command line, I'm just not sure where it needs to be for perl.
        I have tesseract.exe working from the command line, I'm just not sure where it needs to be for perl.

        It may well be ok where it is. The Makefile.PL is probably trying to run /usr/local/bin/tesseract or some such crap. The README that ships with the source warns of the package's deficiencies : "This package runs on Unix/Linux type OS".

        What happens if you just do the bodgey installation by hand as I suggested in my last post ? (There may be reasons I'm unaware of that this will *not* work, but it's not hard to test.)
        Alternatively, you have to dig into the source distro, work out why it can't find tesseract.exe, and make appropriate amendments to the source. Unfortunately, as soon as I see an 'inc' folder in a source distro, it makes me want to puke - so I can't really help much.

        Cheers,
        Rob
        UPDATE: Often, the stuff that's in 'inc' proves to be unnecessary, and my first attempts at fixing problems that it raises are usually just to try and bypass it. So, I would first try removing the first 3 lines of the Makefile.PL and then re-run 'perl Makefile.PL'. (I expect that the EXE_FILES assignment in the Makefile.PL may need to be changed, too.)