develooper Front page | perl.perl5.porters | Postings from January 2018

[perl #132736] pl2bat cannot read from stdin

Thread Previous
From:
Martin Reinders
Date:
January 21, 2018 00:31
Subject:
[perl #132736] pl2bat cannot read from stdin
Message ID:
rt-4.0.24-28161-1516292563-1788.132736-75-0@perl.org
# New Ticket Created by  Martin Reinders 
# Please include the string:  [perl #132736]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=132736 >



This is a bug report for perl from martin@helios.de,
generated with the help of perlbug 1.40 running under perl 5.26.1.


-----------------------------------------------------------------
[Please describe your issue here]

The "pl2bat" utility cannot read from standard input. Example:

   C:\> pl2bat < test.pl > test.bat
   pl2bat.bat: Can't open -: No such file or directory at C:\Strawberry\perl\bin/pl2bat.bat line 101.

The reason seems to be that pl2bat uses open() with 3 arguments.

   open( FILE, '<', $file ) or die "$0: Can't open $file: $!";

which does not treat "-" as stdin. This used to work in earlier Perl releases, where the open() with 2 arguments is used.

Using pl2bat with stdin/stdout is an important feature for our build workflow.

Thank you for any help.
Regards, Martin


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=utilities
    severity=medium
---
Site configuration information for perl 5.26.1:

Configured by strawberry-perl at Sun Sep 24 05:36:07 2017.

Summary of my perl5 (revision 5 version 26 subversion 1) configuration:
   
  Platform:
    osname=MSWin32
    osvers=6.3
    archname=MSWin32-x64-multi-thread
    uname='Win32 strawberry-perl 5.26.1.1 #1 Sun Sep 24 05:32:33 2017 x64'
    config_args='undef'
    hint=recommended
    useposix=true
    d_sigaction=undef
    useithreads=define
    usemultiplicity=define
    use64bitint=define
    use64bitall=undef
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc='gcc'
    ccflags =' -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields'
    optimize='-s -O2'
    cppflags='-DWIN32'
    ccversion=''
    gccversion='7.1.0'
    gccosandvers=''
    intsize=4
    longsize=4
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=3
    ivtype='long long'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='long long'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='g++'
    ldflags ='-s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib"'
    libpth=C:\STRAWB~1\c\lib C:\STRAWB~1\c\x86_64-w64-mingw32\lib C:\STRAWB~1\c\lib\gcc\x86_64-w64-mingw32\7.1.0
    libs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    perllibs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    libc=
    so=dll
    useshrplib=true
    libperl=libperl526.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs
    dlext=xs.dll
    d_dlsymun=undef
    ccdlflags=' '
    cccdlflags=' '
    lddlflags='-mdll -s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib"'


---
@INC for perl 5.26.1:
    C:/Strawberry/perl/site/lib
    C:/Strawberry/perl/vendor/lib
    C:/Strawberry/perl/lib

---
Environment for perl 5.26.1:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=C:\ProgramData\Oracle\Java\javapath;c:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;Y:\bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\;C:\bin;C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules\TShell\TShell\;C:\Program Files\HELIOS.CD26\lib;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Tcl\bin;C:\Program Files\HELIOS.CD26\bin;C:\Program Files\HELIOS.CD26\sbin;C:\ProgramData\Oracle\Java\javapath;c:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;Y:\bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\;C:\bin;C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules\TShell\TShell\;C:\Program
Files\HELIOS.CD26\lib;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin
    PERL_BADLANG (unset)
    SHELL=CMD.EXE


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About