Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Net::SMTP and Perl 5.8.2

by rob_au (Abbot)
on Dec 09, 2003 at 23:24 UTC ( #313596=perlquestion: print w/replies, xml ) Need Help??
rob_au has asked for the wisdom of the Perl Monks concerning the following question:

I have come across a problem in my use of Net::SMTP under a threaded version of Perl 5.8.2 which I cannot fully explain. In essence, identical code under 5.6.1 works without issue, whilst that under the test build of 5.8.2 is returning an "Invalid argument" error. This is most basically demonstrated by the following one line of code:

root@development:~# /opt/bin/perl5.8.2 -MData::Dumper=Dumper -MNet::SM +TP -le '$smtp = Net::SMTP->new("localhost"); print $! unless defined +$smtp' Invalid argument root@development:~# /usr/bin/perl5.6.1 -MData::Dumper=Dumper -MNet::SM +TP -le '$smtp = Net::SMTP->new("localhost"); print $! unless defined +$smtp'

The following is the output of /opt/bin/perl -V - Has anyone come across a similar problem to this under 5.8.2?

root@development:~# /opt/bin/perl -V Summary of my perl5 (revision 5.0 version 8 subversion 2) configuratio +n: Platform: osname=linux, osvers=2.2.20-idepci, archname=i686-linux-thread-mul +ti-64int-ld uname='linux development 2.2.20-idepci #1 sat apr 20 12:45:19 est +2002 i686 unknown ' config_args='' hint=previous, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemulti +plicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='', optimize='-Os', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-stri +ct-aliasing -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS +_HAVE_PIDS -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOU +RCE -D_FILE_OFFSET_BITS=64 -D_POSIX_SOURCE' ccversion='', gccversion='2.95.4 20011002 (Debian prerelease)', gc +cosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +2 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=4 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lbind -lnsl -lgdbm -ldbm -ldl -lm -lcrypt -lutil -lpthread - +lc perllibs=-lbind -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/, so=so, useshrplib=false, libperl=libperl. +a gnulibc_version='2.2.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynami +c' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL +_IMPLICIT_CONTEXT Built under linux Compiled at Dec 5 2003 21:59:46 @INC: /opt/lib/perl5/5.8.2/i686-linux-thread-multi /opt/lib/perl5/5.8.2 /opt/lib/perl5/site_perl/5.8.2/i686-linux-thread-multi /opt/lib/perl5/site_perl/5.8.2 /opt/lib/perl5/site_perl .


perl -le "print+unpack'N',pack'B32','00000000000000000000001010011001'"

Replies are listed 'Best First'.
Re: Net::SMTP and Perl 5.8.2
by ant9000 (Monk) on Dec 12, 2003 at 08:11 UTC
    I've tried to reproduce the error under perl 5.8.0, but everything works as advertised... I really can't see why it should fail.
    You could try to get more info turning debug on with
    $smtp = Net::SMTP->new("localhost", Debug=>1)
    and report here what happens... I have no 5.8.2 around, so I just can't try it myself ;-)
    In any event, the module source code is pretty compact: it should not be too difficult to debug directly and see where does the error come from.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://313596]
Approved by Roger
Front-paged by PERLscienceman
and not a whimper to be heard...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2018-06-19 08:55 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (111 votes). Check out past polls.