Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open with a layer doen't fail, but binmode does #8838

Open
p5pRT opened this issue Mar 16, 2007 · 3 comments
Open

open with a layer doen't fail, but binmode does #8838

p5pRT opened this issue Mar 16, 2007 · 3 comments

Comments

@p5pRT
Copy link

p5pRT commented Mar 16, 2007

Migrated from rt.perl.org#41867 (status was 'open')

Searchable as RT41867$

@p5pRT
Copy link
Author

p5pRT commented Mar 16, 2007

From @nwc10

Created by @nwc10

Why this inconsistency?

$ ./perl -Ilib -we 'open ($fh, "&lt;", "/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, "&lt;​: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

Perl Info

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

@p5pRT
Copy link
Author

p5pRT commented Nov 26, 2011

From @jkeenan

On Fri Mar 16 03​:35​:46 2007, nicholas wrote​:

Why this inconsistency?

$ ./perl -Ilib -we 'open ($fh, "&lt;", "/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, "&lt;​: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?

With Perl 5.14.12, I seem to be getting the opposite results of what you
got​:
###
$ perl -we 'open ($fh, "&lt;", "/etc/motd") or die $!; binmode $fh,
"​:via(Pie)"; print while (<$fh>);'
Cannot find package 'Pie' at -e line 1.
Welcome to Darwin!

$ perl -we 'open ($fh, "&lt;​:via(Pie)", "/etc/motd") or die $!; print while
(<$fh>);'
Cannot find package 'Pie' at -e line 1.
Function not implemented at -e line 1.
###
I got similar results on Linux.

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Nov 26, 2011

The RT System itself - Status changed from 'new' to 'open'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants