Chip Salzenberg <[EMAIL PROTECTED]> wrote: > For Topaz, Scalar's interface included a function that would basically > open the Scalar's hood, giving you a Buffer you could manipulate; then > when you were done working with the Buffer, its modifications (if any) > were propagated back down into the Scalar.
The get_string() and set_string_native() vtable methods should do the right thing. The former returns a COWed copy of the string. If these functions are overloaded they'll implement magic of some kind. > From the outside of a PMC, how can you reasonable ask the question > "are you a basic string"? Does that question always *have* an answer? Well, the question is probably: how lazy are strings? Is it reasonable to implement regexen in terms of iteration? > [*] Unless it's a _feature_ that given tied $a, > ($a = "aaa") =~ s/a/b/g > would call STORE four times ("aaa", "baa", "bba", "bbb"). I'd expect two stores here. One for the initial setting of the value and one for the final result of the global subst. leo