Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Catching typos

by stevieb (Canon)
on Jan 06, 2021 at 16:51 UTC ( [id://11126449]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11126449]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-19 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found