Mail Archives: cygwin/2000/12/18/16:45:48
<18 Dec 2000, 9:11 Uhr wars, als Charles Wilson folgendes schrub:>
< Re: stdin/stdout with perl not o.k >
> Your script works fine here.
>
> ~ > ./test.pl
> Are you o.k?[yes/no] yes
>
> fine...
>
>
> cygutils perl-5.6.0
> cygwin-1.1.6-1
>
> --Chuck
Thank you very much Chuck.
I got a real good hint from Eric.
It is new in perl?
you can set PERLIO=perlio and PERLIO=stdio, i compiled with PERLIO and
then got this problems, if i set PERLIO=stdio export PERLIO=stdio), it
works fine again, now i know, that it is all o.k. with perl, all o.k.
with cygwin, it depends on type of buffering.
NAME
perlio - perl pragma to configure C level IO
SYNOPSIS
Shell:
PERLIO=perlio perl ....
print "Have ",join(',',keys %perlio::layers),"\n";
print "Using ",join(',',@perlio::layers),"\n";
DESCRIPTION
Mainly a Place holder for now.
The %perlio::layers hash is a record of the available ``layers'' that
may be pushed onto a PerlIO stream.
The @perlio::layers array is the current set of layers that are used
when a new PerlIO stream is opened. The C code looks are the array each
time a stream is opened so the ``stack'' can be manipulated by messing
with the array :
pop(@perlio::layers);
push(@perlio::layers,$perlio::layers{'stdio'});
The values if both the hash and the array are perl objects, of class
perlio::Layer which are created by the C code in perlio.c. As yet there
is nothing useful you can do with the objects at the perl level.
There are three layers currently defined:
unix
Low level layer which calls read, write and lseek etc.
stdio
Layer which calls fread, fwrite and fseek/ftell etc. Note that as
this is ``real'' stdio it will ignore any layers beneath it and
got straight to the operating system via the C library as usual.
perlio
This is a re-implementation of ``stdio-like'' buffering written as
a PerlIO ``layer''. As such it will call whatever layer is below
it for its operations.
Defaults and how to override them
If Configure found out how to do ``fast'' IO using system's stdio, then
the default layers are :
unix stdio
Otherwise the default layers are
unix perlio
(STDERR will have just unix in this case as that is optimal way to make
it ``unbuffered'' - do not add a buffering layer!)
The default may change once perlio has been better tested and tuned.
The default can be overridden by setting the environment variable
PERLIO to a space separated list of layers (unix is always pushed
first). This can be used to see the effect of/bugs in the various
layers e.g.
cd .../perl/t
PERLIO=stdio ./perl harness
PERLIO=perlio ./perl harness
AUTHOR
Nick Ing-Simmons <nick AT ing-simmons DOT net>
--
=^..^=
Gerrit Peter Haase
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -