Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Global symbol "$buidTarget" requires explicit package name

by perlancar (Hermit)
on May 14, 2020 at 01:04 UTC ( [id://11116772]=note: print w/replies, xml ) Need Help??


in reply to Re: Global symbol "$buidTarget" requires explicit package name
in thread Global symbol "$buidTarget" requires explicit package name

This gives me an idea for a perl critic policy that warns against declaring package names, subroutine names, variable names, or even hash keys that are prone to misspellings. Wondering what metrics should I use.
  • Comment on Re^2: Global symbol "$buidTarget" requires explicit package name

Replies are listed 'Best First'.
Re^3: Global symbol "$buidTarget" requires explicit package name
by hippo (Bishop) on May 14, 2020 at 08:10 UTC

    I happened upon this list of common misspellings just the other day. Not convinced that many of them would turn up frequently in code anyway, but it might be one place to start. Maybe different policies for different (natural) languages would be easiest?

Re^3: Global symbol "$buidTarget" requires explicit package name
by AnomalousMonk (Archbishop) on May 14, 2020 at 04:27 UTC
    ... metrics ...

    Anything that's spelled. That's what I usually mispel. :)


    Give a man a fish:  <%-{-{-{-<

      See also Mispel as well as Mispelchen.

      «The Crux of the Biscuit is the Apostrophe»

      perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

Re^3: Global symbol "$buidTarget" requires explicit package name
by karlgoethebier (Abbot) on May 14, 2020 at 07:55 UTC

    I’m dreaming since years about something like this: use Acme::LapsusLinguae;. If I wrote use Cuke; but meant use Nose; I would get an compile time error with some in-depth explanation.

    «The Crux of the Biscuit is the Apostrophe»

    perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

Re^3: Global symbol "$buidTarget" requires explicit package name
by perlfan (Vicar) on May 19, 2020 at 08:46 UTC
Re^3: Global symbol "$buidTarget" requires explicit package name
by Anonymous Monk on May 14, 2020 at 18:27 UTC

    Maybe a policy that prohibits variables within a given minimum Levenshtein distance? That might work regardless of language.

Log In?
Username:
Password:

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

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

    No recent polls found