Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Cisco to Juniper - parser help

by GrandFather (Saint)
on May 25, 2021 at 07:05 UTC ( [id://11133006]=note: print w/replies, xml ) Need Help??


in reply to Re: Cisco to Juniper - parser help
in thread Cisco to Juniper - parser help

A large block of global vars set to some arbitrary initial value is a code smell, nay, a code stink. With a cursory glance at the code it seems likely that the warnings are really and truly saying something important about the logic of the code. I would remove all the global variables then put them back in the smallest scope that makes sense, ideally initializing the variables where they are declared with an appropriate value rather than just any old value to shut up the warnings.

If the code logic dictates that the variables are populated piecemeal during multiple passes through the loop I'd either add code to handle unexpectedly unpopulated values or fix the logic errors as appropriate. In either case just shutting up the warnings is stinky coding.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2024-04-18 10:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found