Skip Menu |
Report information
Id: 131145
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: bartolin [at]

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)

Date: Thu, 13 Apr 2017 21:11:07 +0200
To: rakudobug [...]
From: Christian Bartolomaeus <bartolin [...]>
Subject: Modes for need clarification
Download (untitled) / with headers
text/plain 1.7k
Some of the newly added tests for with different modes fail on the JVM backend. The basic modes (:r, :w, :x, :a) and combinations of those do work as expected, but there are problems with :append and :create and :ra. Just now I found where those modes where added (I only looked at before). From the commit message I learned: :append was not meant as a synonym for :a :ra was not meant to stand for "read + append" :r, :a was not meant to stand for "read + append" The first one surprised me the most. But indeed :a and :append work differently: $ rm -f foo 2>/dev/null; ./perl6-m -e '"foo"'; ls -s foo 0 foo $ rm -f foo 2>/dev/null; ./perl6-m -e '"foo"'; ls -s foo Failed to open file /path/to/rakudo.moar/foo: no such file or directory in block <unit> at -e line 1 Actually thrown at: in block <unit> at -e line 1 ls: foo: No such file or directory What poses a problem for rakudo-j is, that :append and :create (without :w) are assumed to mean "read" with Java and those combinations (append + read) and (create + read) do not work well. [2] IMHO a clarification is needed. If we want the additional modes as described in rakudo commit 36f773eb01 (and as implemented, bugs notwithstanding) then we should * define that :append and :create always imply "write" * change the implementation for the JVM backend so that the newly added tests pass * expand the documentation of "open" See also the discussion on #perl6-dev: [1]

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at