Front page | perl.perl5.porters |
Postings from March 2007
[perl #41867] open with a layer doen't fail, but binmode does
From:
Nicholas Clark
Date:
March 16, 2007 17:07
Subject:
[perl #41867] open with a layer doen't fail, but binmode does
Message ID:
rt-3.6.HEAD-1687-1174041346-1617.41867-75-0@perl.org
# New Ticket Created by Nicholas Clark
# Please include the string: [perl #41867]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41867 >
This is a bug report for perl from nick@ccl4.org,
generated with the help of perlbug 1.35 running under perl 5.9.5.
-----------------------------------------------------------------
[Please enter your report here]
Why this inconsistency?
$ ./perl -Ilib -we 'open ($fh, "<", "/etc/motd") or die $!; binmode $fh, ":via(Pie)"; print while (<$fh>);'
IO layers (like ':via(Pie)') unavailable at -e line 1.
$ ./perl -Ilib -we 'open ($fh, "<:via(Pie)", "/etc/motd") or die $!; print while (<$fh>);'
FreeBSD ...
How come binmode fails, whereas open just silently doesn't do what you asked
it to?
Secondly, if we configure without PerlIO, should we even build the
PerlIO::* extensions?
Nicholas Clark
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=medium
---
Site configuration information for perl 5.9.5:
Configured by nick at Fri Mar 16 08:58:56 GMT 2007.
Summary of my perl5 (revision 5 version 9 subversion 5) configuration:
Platform:
osname=freebsd, osvers=6.2-release-p1, archname=i386-freebsd-stdio
uname='freebsd saigo.etla.org 6.2-release-p1 freebsd 6.2-release-p1 #1: sun feb 18 11:53:59 gmt 2007 root@saigo.etla.org:usrobjusrsrcsyssaigo2 i386 '
config_args='-Dusedevel=y -Dcc=ccache gcc -Dld=gcc -Ubincompat5005 -Uinstallusrbinperl -Dcf_email=nick@ccl4.org -Dperladmin=nick@ccl4.org -Dinc_version_list= -Dinc_version_list_init=0 -Doptimize=-g -Uusethreads -Uuse64bitint -Uusemymalloc -Duseperlio -Dprefix=~/Sandpit/snap5.9.x-30603 -Dinstallman1dir=none -Dinstallman3dir=none -Uuserelocatableinc -Uuseperlio -de'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=undef, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='ccache gcc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include',
optimize='-g',
cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include'
ccversion='', gccversion='3.4.6 [FreeBSD] 20060305', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='gcc', ldflags ='-Wl,-E -L/usr/local/lib'
libpth=/usr/lib /usr/local/lib
libs=-lm -lcrypt -lutil -lc
perllibs=-lm -lcrypt -lutil -lc
libc=, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib'
Locally applied patches:
DEVEL
---
@INC for perl 5.9.5:
lib
/home/nick/Sandpit/snap5.9.x-30603/lib/perl5/5.9.5/i386-freebsd-stdio
/home/nick/Sandpit/snap5.9.x-30603/lib/perl5/5.9.5
/home/nick/Sandpit/snap5.9.x-30603/lib/perl5/site_perl/5.9.5/i386-freebsd-stdio
/home/nick/Sandpit/snap5.9.x-30603/lib/perl5/site_perl/5.9.5
.
---
Environment for perl 5.9.5:
HOME=/home/nick
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/nick/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/home/nick/bin:/usr/local/sbin:/sbin:/usr/sbin
PERL_BADLANG (unset)
SHELL=/usr/local/bin/bash
-
[perl #41867] open with a layer doen't fail, but binmode does
by Nicholas Clark