Re: [Boston.pm] Perl 5 to Perl 6 evolution [RETRY]

2010-05-26 Thread Mitchell N Charity
What I've lately been fond of explaining to friends is that "Perl6" is the somewhat misleading name attached to Perl's skunkworks lab. It develops, implements and tests various crazy ideas for new language features, the best of which Perl adopts... Yes, but no. But revealing. Yes, a few i

Re: [Boston.pm] Perl 5 to Perl 6 evolution

2010-05-26 Thread Justin McGuire
Slackware skipped the 6.0 version entirely, they went straight from 4.0 to 7.0. Took them less than a year too, I guess they were on to something. -Original Message- From: boston-pm-bounces+jmcguire=liaison-intl@mail.pm.org [mailto:boston-pm-bounces+jmcguire=liaison-intl@mail.pm.

Re: [Boston.pm] interpolate methods in a string

2010-05-26 Thread Greg London
> Is there a better regexp than \$(\w+) to identify anything that > the perl parser would identify as a variable? This seems to be the crux of whether you feel comfortable using s/// rather than something else. Unfortunately, I don't know the answer with complete and absolute certainty. \w is d

Re: [Boston.pm] Perl 5 to Perl 6 evolution

2010-05-26 Thread Tom Metro
Jason McIntosh wrote: > What I've lately been fond of explaining to friends is that "Perl6" is > the somewhat misleading name attached to Perl's skunkworks lab. It > develops, implements and tests various crazy ideas for new language > features, the best of which Perl adopts... Yes, exactly. > T

Re: [Boston.pm] interpolate methods in a string

2010-05-26 Thread Uri Guttman
> "JP" == Jerrad Pierce writes: JP> Uri, >> i am confused by your statement. i have no abstract fear of tied. JP> I was referring to the OP's earlier statements. JP> Tie may be 'overkill', but arguments have been made that a full templating JP> system is too. >> when simpler one

Re: [Boston.pm] interpolate methods in a string

2010-05-26 Thread Jerrad Pierce
Uri, >i am confused by your statement. i have no abstract fear of tied. I was referring to the OP's earlier statements. Tie may be 'overkill', but arguments have been made that a full templating system is too. >when simpler ones exist? and where did i say not to use interpolation? Not interpolat

Re: [Boston.pm] interpolate methods in a string

2010-05-26 Thread Uri Guttman
> "AA" == Alex Aminoff writes: AA> I hope that is clear. AA> I misunderstood what someone was suggesting, but basically AA> s/\$(\w+)/$object->$1()/sgex; AA> will work, except that I did not trust my own regexp. Better: that is just a basic templater as i said before. now the que

Re: [Boston.pm] interpolate methods in a string

2010-05-26 Thread Alex Aminoff
Sure, let me try to explain what I want to do. We have a bunch of objects of different classes. They all have a lot of methods, more than I would want to list by hand. Not knowing until run time which class or which methods I will want, I would like to be able to interpolate method calls int

Re: [Boston.pm] interpolate methods in a string

2010-05-26 Thread Uri Guttman
> "JP" == Jerrad Pierce writes: JP> Other than some abstract fear of tie, what's wrong with Interpolation? JP> As implemented, you could easily Memoize the subroutine you bind as your JP> handler. You can even easily bind two versions, one that memoizes and JP> another that does not.

Re: [Boston.pm] interpolate methods in a string

2010-05-26 Thread Jerrad Pierce
Other than some abstract fear of tie, what's wrong with Interpolation? As implemented, you could easily Memoize the subroutine you bind as your handler. You can even easily bind two versions, one that memoizes and another that does not. -- Free map of local environmental resources: http://Cambridg

Re: [Boston.pm] interpolate methods in a string

2010-05-26 Thread Uri Guttman
> "AA" == Alex Aminoff writes: AA> On Tue, 25 May 2010, Kenneth Graves wrote: >> In the simple case (known methods/no side effects), then one of Uri's solutions will work. >> >> For the case of unknown methods, a two pass solution might work: collect the method names from the temp

Re: [Boston.pm] interpolate methods in a string

2010-05-26 Thread Uri Guttman
> "AA" == Alex Aminoff writes: AA> On Tue, 25 May 2010, Uri Guttman wrote: >> so that is 6 ways to do it without eval and tied. :) AA> Thanks, I did in fact consider, and in a couple cases implement, all AA> of those possible solutions, but was not happy with any of them. AA> Bas

Re: [Boston.pm] interpolate methods in a string

2010-05-26 Thread Alex Aminoff
On Tue, 25 May 2010, Kenneth Graves wrote: In the simple case (known methods/no side effects), then one of Uri's solutions will work. For the case of unknown methods, a two pass solution might work: collect the method names from the template, then call them with $object->$method() syntax, t

Re: [Boston.pm] interpolate methods in a string

2010-05-26 Thread Alex Aminoff
On Tue, 25 May 2010, Uri Guttman wrote: so that is 6 ways to do it without eval and tied. :) Thanks, I did in fact consider, and in a couple cases implement, all of those possible solutions, but was not happy with any of them. Basically, either the template is too cluttered: [%title%]...