develooper Front page | perl.perl5.porters | Postings from March 2007

[perl #41867] open with a layer doen't fail, but binmode does

Nicholas Clark
March 16, 2007 17:07
[perl #41867] open with a layer doen't fail, but binmode does
Message ID:
# New Ticket Created by  Nicholas Clark 
# Please include the string:  [perl #41867]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from,
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]
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:
    osname=freebsd, osvers=6.2-release-p1, archname=i386-freebsd-stdio
    uname='freebsd 6.2-release-p1 freebsd 6.2-release-p1 #1: sun feb 18 11:53:59 gmt 2007 i386 '
    config_args='-Dusedevel=y -Dcc=ccache gcc -Dld=gcc -Ubincompat5005 -Uinstallusrbinperl -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
    cc='ccache gcc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include',
    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
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-DPIC -fPIC', lddlflags='-shared  -L/usr/local/lib'

Locally applied patches:

@INC for perl 5.9.5:

Environment for perl 5.9.5:
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)
    SHELL=/usr/local/bin/bash Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About