Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Should chomping a constant always raise an error?

by Mr. Muskrat (Canon)
on Mar 11, 2005 at 03:33 UTC ( #438520=note: print w/replies, xml ) Need Help??


in reply to Should chomping a constant always raise an error?

Does it make sense to anyone else that chomp tests and carps about receiving a read-only parameter, before it tests whether it would require modification?

Yes. It is well documented that chomp only works if you give an lvalue to work with.

I don't want to sound cruel but you want to modify core functionality for a very specific edge case. Good luck getting it implemented.

It's easier to go with what works. Use a temporary variable if you think that someone will pass you a constant.

  • Comment on Re: Should chomping a constant always raise an error?

Replies are listed 'Best First'.
Re^2: Should chomping a constant always raise an error?
by BrowserUk (Patriarch) on Mar 11, 2005 at 03:35 UTC

    I had no intention of modifying core functionality. I just got surprised by it.


    Examine what is said, not who speaks.
    Silence betokens consent.
    Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco.

      Fair enough. I must have read more into your OP.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2022-05-23 12:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (82 votes). Check out past polls.

    Notices?