Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

'perl Makefile.PL' warning for v5.20 to v5.24

by kcott (Archbishop)
on Jun 23, 2022 at 12:31 UTC ( #11144976=perlquestion: print w/replies, xml ) Need Help??

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

G'day All,

I encountered a warning when running 'perl Makefile.PL' on Perl versions between 5.20 and 5.24 inclusive. Versions 5.16, 5.18 and all stable versions from 5.26 to 5.36 did not have this problem.

WARNING: ABSTRACT contains control character(s), they will be removed

I identified the problem as being DOS-style line endings (i.e. CRNL) in the *.pm file. When I converted these to Unix-style line endings (i.e. just NL) the warnings stopped.

$ perl -pi -e 's/\r$//' path_to_pm_file

I checked perl5200delta and "ExtUtils::MakeMaker for v5.20.0" for any documentation regarding the introduction of this warning: none found.

So, my questions:

  • Have others encountered the same warning message?
  • Does anyone have any links to information regarding this warning?
  • The warning seems to be completely harmless. Is it?
  • Are there better ways to handle this (e.g. perhaps some flag in Makefile.PL) beyond converting the line endings of the *.pm file?

For anyone wondering why I'm testing with so many versions, see "Perl images for GitLab CI" for some background information.

— Ken

Replies are listed 'Best First'.
Re: 'perl Makefile.PL' warning for v5.20 to v5.24
by cavac (Priest) on Jun 23, 2022 at 13:12 UTC

    * Have others encountered the same warning message?

    Sometimes, yes.

    * Does anyone have any links to information regarding this warning?

    Not me. But from memory, Perl just checks in the ASCII/Unicode control character set and excludes those from warnings that are explicitely allowed.

    * The warning seems to be completely harmless. Is it?

    Maybe. But it IS a warning, so at least one person thought this could be a problem big enough to write some code to warn you.

    BTW, if you are using vim, :set ff=unix should also work to convert the file format.

    PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP

      G'day cavac,

      "Sometimes, yes."

      Was it just in the range of Perl versions that I indicated? Did it consistently happen in those ranges?

      "... at least one person thought this could be a problem big enough to write some code to warn you."

      I'm trying to determine why it was a "big enough" problem; and why it was only such a problem across three Perl versions.

      "... if you are using vim ..."

      Thanks for the tip; however, this problem occurs in legacy $work code (probably over a decade old). I do use vim but I didn't write this code, nor am I its maintainer.

      — Ken

        I don't have any systems anymore with such old Perl versions, so i'm limited to my rusty old memory and what i can glean from documentation.

        I've read through the relevant perldeltas for 5.20 and 5.26. Both had changes regarding handling of literal control characters in variable names.

        5.20 added deprecation warnings and 5.26 made code changes to disallow their use.

        After seeing this, my best guess (without knowing the perl internals or grepping through the changelogs) is that the small change for 5.20 has introduced some false positives in control characters detection and 5.26 changed the parser enough that those went away.

        My second guess would be a change in the Unicode handler, probably in the way Perl or a script detects Unicode/fileending stuff. v5.20 was the upgrade to Unicode 6.3, v5.26 to 9.0.

        I could be totally mistaken, though.

        PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP
Re: 'perl Makefile.PL' warning for v5.20 to v5.24
by bingos (Vicar) on Jun 30, 2022 at 13:25 UTC

    This arose as a ticket raised against Extutils::MakeMaker rt://66113

    It is a warning and ABSTRACT has any control characters automagically stripped

      G'day bingos,

      ++ Many thanks. That explains the appearance of the warning in v5.20.

      Any ideas on its disappearance in v5.26 (and later versions)?

      — Ken

        Any ideas on its disappearance in v5.26 (and later versions)?

        The condition that triggers the warning (in MM_Any.pm) is:
        if ($self->{ABSTRACT} && $self->{ABSTRACT} =~ m![[:cntrl:]]+!) { # war +ning is given }
        That condition is still there in perl-5.26, and I can't see any change to it.
        Perhaps a change in the regex engine was introduced in 5.26.

        Are you able to verify that the abstract does, in fact, =~ m![[:cntrl:]]+! in perl-5.20 but not in perl-5.26 and later ?
        The question would then be "Did that change in the regex fix a problem, or did it create one ?".
        From your description of the ABSTRACT, I'm not sure that it does actually contain any control characters.

        Update:
        I'm having no luck in reproducing your issue at all (on Windows).
        I find that it's the same behaviour from 5.20 onwards. For me, the presence of either chr(10) ("\n") or chr(13) ("\r") always results in a match.
        What's the perl -V ?

        Cheers,
        Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11144976]
Approved by johngg
Front-paged by davies
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2022-08-10 17:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?