Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: How do I determine if a variable contains a type glob?

by dpchrist (Initiate)
on Dec 07, 2016 at 02:16 UTC ( [id://1177355]=note: print w/replies, xml ) Need Help??


in reply to Re^3: How do I determine if a variable contains a type glob?
in thread How do I determine if a variable contains a type glob?

I like the way you disable all warnings. :-) But, why? (I have some ideas, but I ask just to be sure.)

local $^W;

Replies are listed 'Best First'.
Re^5: How do I determine if a variable contains a type glob?
by BrowserUk (Patriarch) on Dec 07, 2016 at 02:29 UTC
    But, why?

    That code was typed straight into the web page and not tested. In general if you have an isItSomething() routine returning a bool, you don't want it to produce any warnings, just return false if what you've been passed isn't what you're testing for.

    The fact that there appears to be nothing you can give to ref that produces a warning means it is probably redundant.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-26 00:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found