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/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='-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'"


In reply to Net::SMTP and Perl 5.8.2 by rob_au

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.