develooper Front page | perl.perl6.compiler | Postings from July 2012

[perl #114124] open () error message is LTA

From:
Paweł Pabian
Date:
July 13, 2012 05:00
Subject:
[perl #114124] open () error message is LTA
Message ID:
rt-3.6.HEAD-11172-1342180826-1182.114124-82-0@perl.org
# New Ticket Created by  Paweł Pabian 
# Please include the string:  [perl #114124]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=114124 >


I've made this stupid mistake and was unable to find bug (space between bracket and open) due to misleading error message.

$ perl6 -e 'my $f = open ("logo_32x32.png", :bin); say $f.read(1e5).bytes; $f.close;'
This type cannot unbox to a native string

moritz @ 1:54
still the error is LTA
it should eithe constrain the type to Str, or should coerce to it

tadzik @ 1:55
the first thing we ever put into Perl::Critic is checking for things like this
subcall (foo); "please write me as subcall((foo)) to not confuse everybody"





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