Am 11.01.2012 16:46, schrieb Will Coleda via RT:
On Tue Aug 17 21:54:31 2010, coke wrote:
On Sun Apr 25 07:22:56 2010, masak wrote:
<JimmyZ>  masak: alpha is diferent from rakudo
<JimmyZ>  masak: which one is right?
<JimmyZ>  alpha: my $b =&time; say&$b();
<p6eval>  alpha 30e0ed: OUTPUT«1272203938.46735␤»
<JimmyZ>  rakudo: my $b =&time; say&$b();
<p6eval>  rakudo e393c7: OUTPUT«␤»
<masak>  rakudo: my $b =&time; say $b();
<p6eval>  rakudo e393c7: OUTPUT«1272203984.27821␤»
<masak>  JimmyZ: viv seems to indicate that alpha was right there.
<masak>  i.e. that&$b() should be parsed as (&$b).()
* masak submits rakudobug

Error has changed:

00:53<[Coke]>  rakudo: my $b =&time; say&$b();
00:53<p6eval>  rakudo 67778a: OUTPUT«===SORRY!===␤Non-declarative
sigil is
                missing its name at line 22, near "&$b();"␤»


And again:

10:45<  [Coke]>  rakudo: my $b =&time; say&$b();
10:46<+p6eval>  rakudo 38165a: OUTPUT«===SORRY!===␤Symbol '&time' not
                 predeclared in<anonymous>  (/tmp/rmvYisn_Ne:1)␤»


The problem here is just that 'time' is implemented as a term, not as a subroutine in the setting. If I do the same thing with something that's actually a subroutine, it works fine:

09:46 < moritz> nom: sub f { 6 }; my $b = &f; say &$b()
09:46 <+p6eval> nom 47540c: OUTPUT«6␤»

likewise if I reference 'time' correctly:

09:47 <+p6eval> nom 47540c: OUTPUT«1326441971␤»
09:47 < moritz> nom: my $b = &term:<time>; &$b()

Can be closed with tests.

Cheers,
Moritz

Reply via email to