Michael Fowler wrote:

> Or maybe we need a more generic solution (as someone else suggested, I
> forget who).  Something that allows the arbitrary execution of code, much
> like @{[ ]}, but cleaner.  Unfortunately, I can't think of anything
> suitable.
> 
> Whatever direction this discussion takes, I don't think it should impact the
> interpolation of method calls.  It'd be nice to find a clean and simple
> syntax for calling functions within double-quoted strings, but it's already
> clean and simple to call methods.
> 
> Michael

First, thanks for pointing out that ${something->something2} already
has a meaning.

Second, I think @{[ ... ]} is a plenty clean way to interpolate
absolutely anything.  with tieing, we can get method calls to look
like hash lookups can we not, so why not do that if your method is
supposed to support interpolation?

        "the result of f($arg) is $mytiedfunction{$arg}"

Maybe some syntax that is more direct than C<tie> to allow such things
would do the trick?

Or MJD's module, does it allow this:

        tie %myfunction, THAT_MODULE, {some function which will be stuck into the 
FETCH method}


-- 
                          David Nicol 816.235.1187 [EMAIL PROTECTED]
           perl -e'map{sleep print$w[rand@w]}@w=<>' ~/nsmail/Inbox

Reply via email to