Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: $foo->bar = 14;

by Aristotle (Chancellor)
on Dec 29, 2002 at 20:30 UTC ( #222952=note: print w/replies, xml ) Need Help??


in reply to $foo->bar = 14;

As shotgunefx pointed out, there's unfortunately no way to constrain the value assigned in anyway, neither before nor after the assignment. That renders the attribute nearly useless as far as I'm concerned.. a pity, since it'd be a lovely way to offer a bit of syntactical sugar. You could even support both the ->bar("baz") and the ->bar = "baz" style at the same time, but that's a moot consideration as is. :(

Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://222952]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2017-12-15 01:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (415 votes). Check out past polls.

    Notices?