develooper Front page | perl.perl6.language | Postings from April 2005

{ => } autocomposition

Thread Next
From:
Autrijus Tang
Date:
April 20, 2005 07:39
Subject:
{ => } autocomposition
Message ID:
20050420143834.GA15699@aut.dyndns.org
In Pugs's t/pugsbugs/map_function_return_values.t, iblech added this test:

    %ret = map { $_ => uc $_ }, split "", $text;

This fails because it is parsed, undef the {=>} autocomposition rule, into:

    # Fails because arg1 is not Code
    %ret = map(hash($_ => uc $_), split("", $text));

Instead of the intended:

    # Works correctly
    %ret = map(sub ($_) { $_ => uc $_ }, split("", $text));

Is this a known issue?

Thanks,
/Autrijus/

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About