in reply to Catching typos

hippo quickly came up with at least one possible reason. Any half decent editor or IDE would catch this typo and at least warn about it.

I can't even think of an instance where that would fly, unless you've declared a reeturn() sub.

In what context is this used in?

Replies are listed 'Best First'.
Re^2: Catching typos
by LanX (Saint) on Jan 06, 2021 at 17:21 UTC
    > Any half decent editor or IDE would catch this typo and at least warn about it.

    Really? Most IDE depend on running perl -c for checks.

    Emacs syntax highlighting and indentation help me in similar cases , but that's not a warning. ..

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      My IDE highlights the word in yellow (warning), and hovering over it produces the following pop-up: Unable to find sub definition, declaration, constant definition or typeglob aliasing. It also throws a yellow dot at the line where the warning is located, so even if that line isn't in view on the screen, I can always see if there are any warnings/errors anywhere within the file at a glance. Everything happens live-time, so I can actually see it immediately after I'm done typing.

      Here's an image of what I'm speaking of. If I point at the word, the notice pops up.

        Interesting. .. my guess is it's running Perl::Critic in the background.

        So what happens if you have an AUTOLOAD defined?

        NB: You'd need parens for reeturn() then.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery