delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/31/08:08:35

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-AuthUser: gerrit:koeln.convey.de
Date: Sat, 31 May 2003 12:51:36 +0200
From: "Gerrit P. Haase" <gp AT familiehaase DOT de>
Organization: Esse keine toten Tiere
X-Priority: 3 (Normal)
Message-ID: <0855760618.20030531125136@familiehaase.de>
To: Greg Matheson <lang AT ms DOT chinmin DOT edu DOT tw>
CC: cygwin AT cygwin DOT com
Subject: Re: Should PERLIO=no_crlf be the default on Cygwin?
In-Reply-To: <20030531065029.A27011@ms.chinmin.edu.tw>
References: <001601c324fc$16d4f700$6500a8c0 AT ufo>
<002901c32504$947701f0$78d96f83 AT pomello>
<68785452711 DOT 20030530171948 AT familiehaase DOT de>
<20030531065029 DOT A27011 AT ms DOT chinmin DOT edu DOT tw>
MIME-Version: 1.0

Hallo Greg,

Am Samstag, 31. Mai 2003 um 00:50 schriebst du:

> On Fri, 30 May 2003, Gerrit P. Haase wrote:

>> Hallo Max,

>> >>> Since Cygwin runs on Windows and Windows is a DOS system the PERLIO
>> >>> layer crlf is default.

>> > Is there any way to tell perlio "just let the system (i.e.
>> > cygwin) handle things"?  That would be a nice default.

>> I need to patch the sources to do this, but it is no major problem,
>> I'm already testing with the patched version and it seems to be the
>> best solution to make no_crlf the default for Cygwin, it is also no
>> problem then to pull it in everytime it is needed with PERLIO=crlf.

> It would be good to be able to use the 'open' pragma to do this,
> rather than an environmental variable. 

>         use open IN  => ":crlf", OUT => ":bytes";

> But it didn't seem to work.

It seems that, according to the open.pm docs, only these layers are
available: 
   use open ':utf8';
   use open ':locale';
   use open ':encoding(iso-8859-7)';
   use open ':std';

These two layers are pseudo layers which are only available when Perl
is built without perlio:
   use open IN  => ":crlf", OUT => ":bytes";
   
More about this> perldoc open


It works when not using the pragma, but as argument to open():

#!/usr/bin/perl
open OUTFILE, ">:crlf", "text.txt";
print OUTFILE "This is a test.\n";
close OUTFILE;


Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019