in reply to Re^8: Assignable Subroutines
in thread Assignable Subroutines
That's not better than a myriad validator routines all slightly different?
No. The validation is applied only to the value, and only where required.
If I defined a 'string-that-can-only-contain-uppercase' type and a 'string-that-can-only-contain-decimal-digits' type and then later want to join my userids with their respective phone numbers for display, I have a type clash.
This is conflating type validation with value validation.
Traits
How do traits validate an lvalue assignment to a partital field.
eg. substr( $x, $start, $length ) = $str;
tieing
How does STORE gain access to the lvalue selection criteria from the lvalue sub call?
Same example. How do I know at STORE time, what part of the string is affected?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: Assignable Subroutines
by dragonchild (Archbishop) on Jan 26, 2005 at 19:06 UTC | |
|
Re^10: Assignable Subroutines
by Aristotle (Chancellor) on Jan 26, 2005 at 19:32 UTC | |
by BrowserUk (Patriarch) on Jan 26, 2005 at 20:35 UTC | |
by Aristotle (Chancellor) on Jan 26, 2005 at 21:55 UTC | |
by BrowserUk (Patriarch) on Jan 26, 2005 at 22:22 UTC | |
by Aristotle (Chancellor) on Jan 27, 2005 at 01:33 UTC | |
|