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

Re: Stopping bad input (harder than sanitizing)

by jcb (Parson)
on Mar 09, 2021 at 00:20 UTC ( [id://11129357]=note: print w/replies, xml ) Need Help??


in reply to Stopping bad input (harder than sanitizing)

Your immediate problem is simple: sub search goes into an infinite loop if $search_pattern is undefined. Instead of a goto, simply return early, as in return unless defined $search_pattern; which will cause the Tk event loop to resume and the UI to wait for the user to try again.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-20 06:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found