PetaMem has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

I'm currently trying to install Mail::Folder::FastReader. This needs grepmail however it seems, that grepmail 4.70 is somehow incompatible with 5.8.0:

..SNIP.. t/functionality....FAILED tests 1-25, 27-33, 35-82, 84-90, 92-114 Failed 110/114 tests, 3.51% okay (less 4 skipped tests: 0 okay +, 0.00%) Failed Test Stat Wstat Total Fail Failed List of Failed ---------------------------------------------------------------------- +--------- t/functionality.t 114 110 96.49% 1-25 27-33 35-82 84-9 +0 92-114 4 subtests skipped. Failed 1/1 test scripts, 0.00% okay. 110/114 subtests failed, 3.51% ok +ay. make: *** [test_dynamic] Error 29 /usr/bin/make test -- NOT OK Running make install make test had returned bad status, won't install without force
Has anyone made already experiences with this module under 5.8.0?

Bye
 PetaMem

Replies are listed 'Best First'.
Re: grepmail not 5.8.0 safe?
by RMGir (Prior) on Jul 31, 2002 at 12:06 UTC
    I haven't got 5.8.0 installed yet, so I can't try that here.

    It's not clear from what you posted how you know grepmail's the problem. Is it involved in all the tests that failed?

    Have you tried reinstalling grepmail? It's probably easier to diagnose grepmail problems directly, rather than by seeing how M::F::FR fails. And as a bonus, maybe once you've reinstalled the current version (and 4.70 is right, I just checked), the Mail package will suddenly work :)
    --
    Mike

      When invoking this version of grepmail with perl 5.8.0 all output start with:

      Useless (?g) - use /g modifier in regex; marked by <-- HERE in m/(?mg +<-- HERE x)^(From\s.*\d:\d\d:\d\d\s\d{4}| From\s.*\d:\d\d:\d\d\s\d{4}\s[+-]\d{ +4}| From\s.*\d:\d\d\s.*\w{2,3}\s\d{4})$/ + at ./grepmail.orig line 163.

      You can use following diff which reduces number of failing test to 55:)

      diff grepmail.orig grepmail 161c161 < while($READ_BUFFER =~ m/(?mgx)^(From\s.*\d:\d\d:\d\d\s\d{4}| --- > while($READ_BUFFER =~ m/(?mx)^(From\s.*\d:\d\d:\d\d\s\d{4}|
        Interesting... Did you add the /g to the close of the match, too?

        That while doesn't look like it will work without it...

        $ perl -e'$_="abcabcdabc";while(/(?g)(a[^a]+)/){print "$1\n"}' abc abcd abc
        Cool, with 5.6.1, ?g did "the right thing".

        I guess it was disallowed as a local modifier in 5.8.0 because it doesn't make sense to apply it to just part of the regex?
        --
        Mike