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

File::Copy fails to set $! on error on Win32 #14237

Open
p5pRT opened this issue Nov 13, 2014 · 3 comments
Open

File::Copy fails to set $! on error on Win32 #14237

p5pRT opened this issue Nov 13, 2014 · 3 comments

Comments

@p5pRT
Copy link

p5pRT commented Nov 13, 2014

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

Searchable as RT123199$

@p5pRT
Copy link
Author

p5pRT commented Nov 13, 2014

From @frioux

This is a bug report for perl from frew@​cpan.org,
generated with the help of perlbug 1.40 running under perl 5.20.1.


Basically I have this line of code​:

  File​::Copy​::copy($tmp_fn, $full_path) or die "$!"

The $full_path above has non-existent directory, so it fails to copy entirely.

The real error does actually end up in $^E, which is how I diagnosed the issue,
but the doc says it uses $! so it probably should.



Flags​:
  category=library
  severity=medium
  module=File​::Copy


Site configuration information for perl 5.20.1​:

Configured by strawberry-perl at Tue Sep 16 00​:55​:31 2014.

Summary of my perl5 (revision 5 version 20 subversion 1) configuration​:
 
  Platform​:
  osname=MSWin32, osvers=6.3, archname=MSWin32-x86-multi-thread
  uname='Win32 strawberry-perl-no64 5.20.1.1 #1 Tue Sep 16 00​:53​:53 2014 i386'
  config_args='undef'
  hint=recommended, useposix=true, d_sigaction=undef
  useithreads=define, usemultiplicity=define
  use64bitint=undef, use64bitall=undef, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='gcc', ccflags =' -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields',
  optimize='-s -O2',
  cppflags='-DWIN32'
  ccversion='', gccversion='4.8.3', 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='long long', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='g++', ldflags ='-s -L"C​:\Inetpub\strawberry\perl\lib\CORE" -L"C​:\Inetpub\strawberry\c\lib"'
  libpth=C​:\Inetpub\strawberry\c\lib C​:\Inetpub\strawberry\c\i686-w64-mingw32\lib C​:\Inetpub\strawberry\c\lib\gcc\i686-w64-mingw32\4.8.3
  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=libperl520.a
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_win32.xs, dlext=xs.dll, d_dlsymun=undef, ccdlflags=' '
  cccdlflags=' ', lddlflags='-mdll -s -L"C​:\Inetpub\strawberry\perl\lib\CORE" -L"C​:\Inetpub\strawberry\c\lib"'


@​INC for perl 5.20.1​:
  C​:/Inetpub/lynx/strawberry/perl/site/lib
  C​:/Inetpub/lynx/strawberry/perl/vendor/lib
  C​:/Inetpub/lynx/strawberry/perl/lib
  .


Environment for perl 5.20.1​:
  HOME (unset)
  LANG (unset)
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=C​:\Inetpub\lynx\strawberry\c\bin;C​:\Inetpub\lynx\strawberry\perl\bin;C​:\Windows\system32;C​:\Windows;C​:\Windows\System32\Wbem;C​:\Windows\System32\WindowsPowerShell\v1.0\;C​:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C​:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C​:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C​:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C​:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\
  PERL_BADLANG (unset)
  SHELL (unset)

@p5pRT
Copy link
Author

p5pRT commented Nov 13, 2014

From frioux@gmail.com

I forgot to mention that the actual error I got from putting $^E in
the die was​:

  The system cannot find the path specified

@p5pRT
Copy link
Author

p5pRT commented Nov 13, 2014

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