Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: Catching typos

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


in reply to Re^2: Catching typos
in thread Catching typos

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.

Replies are listed 'Best First'.
Re^4: Catching typos
by LanX (Saint) on Jan 06, 2021 at 18:12 UTC
    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

      It's the Perl5 Camelcade plugin for intelliJ IDEA. I've been using it religiously (along with the Vim plugin, of course) for numerous years now.

      I'm doubtful that it uses Perl::Critic, as it works just fine if that distribution isn't installed. I'm quite sure it uses its own parser, but I am not 100% sure either way. It works the exact same way with Python, JS/jQuery etc.

      The only Perl distributions that I install in support of this software is Devel::Camelcadedb, which simply supplies Perl debug support within the IDE.

        The docs of Camelcade talk about sub resolution, but I'm not sure how it's implemented.

        Inspecting the Op-Tree could be a way, cause B::Deparse shows that it's a method call and B::Xref lists all subs.

        Camelcade also warns that sub resolution is not 100% reliable.

        Unless an implementation offers it via "Language Server Protocol" I doubt one can call it a common IDE feature.

        And I'd really like to know how the existence of a sub AUTOLOAD is handled...

        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://11126455]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-03-29 14:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found