Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Prevent Strings From Being Interpreted As A File Handle

by amon (Scribe)
on Apr 27, 2014 at 11:54 UTC ( [id://1083991]=note: print w/replies, xml ) Need Help??


in reply to Re: Prevent Strings From Being Interpreted As A File Handle
in thread Prevent Strings From Being Interpreted As A File Handle

Thank you for coming up with the instance workaround.

However, I am not trying to prevent this ambiguity, but to resolve it in a specific way (i.e. I'm seeking Perl wisdom, not trying to solve the immediate problem which I'm already mitigating using other means). In general, Perl is flexible enough to change such core behavior, and I would like to find out how this can be done. I was very careful to word my question as “How can I disambiguate a method call on a string so that it is always resolved as a class method call, and not as a call on an IO instance?” – both “method call” and “string” are central to my question.

  • Comment on Re^2: Prevent Strings From Being Interpreted As A File Handle

Replies are listed 'Best First'.
Re^3: Prevent Strings From Being Interpreted As A File Handle
by BrowserUk (Patriarch) on Apr 27, 2014 at 12:39 UTC
    both “method call” and “string” are central to my question.

    I covered your objections with my last sentence: Bottom line: stop going out of your way to artificially create problems.

    Even if you succeed in finding a way to subvert Perl into doing this stupid thing; it won't stop it being stupid.


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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2024-04-26 08:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found