in reply to Re: Where does the spurious error message come from?
in thread Where does the spurious error message come from?

If you switch the order of the functions in the code, the spurious error message goes away.

By the way, I'd be interested to know how other versions of perl behave - IIRC there were some changes in 5.38 to error handling with the intent to show more readable error messages.

  • Comment on Re^2: Where does the spurious error message come from?

Replies are listed 'Best First'.
Re^3: [OT] Where does the spurious error message come from?
by jo37 (Curate) on Aug 04, 2023 at 20:27 UTC

    A compiler that proceeds after recognising an error reminds me of the time when I had to program in PL/I. That beast was designed for those circumstances where you drop a box full of punched cards at the data centre's desk and get the compiler's result the next day. A missing semicolon would have cost you one full day unless the compiler were forgiving enough and guessed you intention. Some of the most serious programming errors, like assigning incompatible types, e.g. pointer to character, resulted in an inconspicuous warning "data conversion done by subroutine call".

    Greetings,
    -jo

    $gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$
      I bet that the your warning was buried in a blizzard of warnings about conversions that you did intend. In Perl, there is almost no penalty for recompiling after fixing a few obvious errors. I have come to expect that some of the remaining ones will disappear.
      Bill
        I bet that the your warning was buried in a blizzard of warnings about conversions that you did intend.

        No. That's the funny thing: There are so many possible conversions that would be done "out of the box". From / to binary, decimal, float, character: no warnings AFAIR. Whenever this "done by subroutine call" warning appeared, something was badly wrong.

        Greetings,
        -jo

        $gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$
Re^3: Where does the spurious error message come from?
by LanX (Saint) on Aug 04, 2023 at 17:37 UTC
    > you switch the order of the functions in the code, the spurious error message goes away.

    That's an indication that my direction of thinking was right.

    Only monks versed with the parser phases will be able to tell better

    But I see you just posted that it was fixed in 5.38, so maybe not worth further digging. :)

    Cheers Rolf
    (addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
    Wikisyntax for the Monastery