Skip Menu |

This queue is for tickets about the Net-SFTP-Foreign CPAN distribution.

Report information
The Basics
Id: 37018
Status: resolved
Worked: 30 min
Priority: 0/
Queue: Net-SFTP-Foreign

People
Owner: salva [...] cpan.org
Requestors: RYBSKEJ [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.38
Fixed in: (no value)



Subject: mod_perl startup warning
When using the module in a mod_perl (1.30) environment, I'm getting the following warning when starting the apache server: "Statement unlikely to be reached at /usr/lib/perl5/site_perl/5.8.8/Net/SFTP/Foreign.pm line 387. (Maybe you meant system() when you said exec()?)" Since it appears that exec() is harmless in this case, the general method to suppress such warnings is to encapsulate the exec call within a BLOCK, like: { exec @open2_cmd; } Note that I believe this issue is caused by the fact that Apache overrides exit(), and that there's a known issue in Perl core regarding warnings for overloaded functions in such exec() cases (see http://markmail.org/message/np3inogta56uirzl for a discussion of this). I'm not sure if this has been (or will be) fixed in Perl 5.10. Thus, an alternative method could be to explicitly call CORE::exit() on line 387, since you are managing your own child process here from what I can see. Either this or just encapsulating exec() in a block will suppress the warning. I've attached my environment details (perl_build_config.txt) for reference.
Subject: perl_build_config.txt
Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.4.18-3, archname=i686-linux uname='linux localhost.localdomain 2.4.18-3 #1 thu apr 18 07:37:53 edt 2002 i686 unknown ' config_args='-des -Dinstallprefix=/usr -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dscriptdir=/usr/bin -Dman3ext=3pm -Dinc_version_list=5.8.7 5.8.6 5.8.5' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-O2', cppflags='-fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm' ccversion='', gccversion='2.96 20000731 (Red Hat Linux 7.3 2.96-110)', 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='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lndbm -lgdbm -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.2.5.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.2.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: PERL_MALLOC_WRAP USE_LARGE_FILES USE_PERLIO Built under linux Compiled at Apr 30 2008 17:49:29 @INC: /usr/lib/perl5/5.8.8/i686-linux /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i686-linux /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i686-linux /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl .
solved in the upcoming version 1.39