develooper Front page | perl.perl5.porters | Postings from August 2001

[ID 20010831.002] Bug in Term::Cap on Solaris ansi terminal usingCPAN::Shell

Thread Next
From:
mike808
Date:
August 31, 2001 15:04
Subject:
[ID 20010831.002] Bug in Term::Cap on Solaris ansi terminal usingCPAN::Shell
Message ID:
200108312123.QAA27476@smtp.networkusa.net
I get the following error using the CPAN.pm shell:

Use of uninitialized value in pattern match (m//)
at /usr/local/perl-5.6.1/lib/5.6.1/Term/Cap.pm line 284.

This patch will correct the problem.

diff Term/Cap.pm /usr/local/perl-5.6.1/lib/5.6.1/Term/Cap.pm
284c284
<     if (defined $string && $string =~ /(^[\d.]+)(\*?)(.*)$/) {
---
>     if ($string =~ /(^[\d.]+)(\*?)(.*)$/) {

I suspect it is due to my termcap defining an attribute but no value,
and $string is undef when evaluated in the Tpad method.

Here's the gory details:
My system:
$ uname -a
SunOS abcdef 5.8 Generic sun4u sparc SUNW,Ultra-250

My terminal emulation
$ infocmp
#       Reconstructed via infocmp from file: /usr/share/lib/terminfo/a/ansi
ansi|generic ansi standard terminal,
        am, xon,
        cols#80, lines#24,
        bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z,
        clear=\E[H\E[J, cr=\r, cub=\E[%p1%dD, cub1=\b,
        cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
        dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K,
        home=\E[H, hpa=\E[%p1%{1}%+%dG, ht=\t, hts=\EH,
        ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L,
        ind=\n, invis=\E[8m, kbs=\b, kcub1=\E[D, kcud1=\E[B,
        kcuf1=\E[C, kcuu1=\E[A, khome=\E[H,
        rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m, rmso=\E[m,
        rmul=\E[m,
        sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m,
        sgr0=\E[0m, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
        vpa=\E[%p1%{1}%+%dd,

My perl
$ perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
    osname=solaris, osvers=2.8, archname=sun4-solaris
    uname='sunos abcdef 5.8 generic sun4u sparc sunw,ultra-250 '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=unde
f
    useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
    cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_S
OURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O',
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='2.95.3 20010315 (release)', gccosandvers='solaris2
.8'
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize
=8
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib '
    libpth=/usr/local/lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc
    perllibs=-lsocket -lnsl -ldl -lm -lc
    libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -R /usr/local/pe
rl-5.6.1/lib/5.6.1/sun4-solaris/CORE'
    cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'

Characteristics of this binary (from libperl):
  Compile-time options: USE_LARGE_FILES
  Built under solaris
  Compiled at Aug 22 2001 13:27:15
  @INC:
    /usr/local/perl-5.6.1/lib/5.6.1/sun4-solaris
    /usr/local/perl-5.6.1/lib/5.6.1
    /usr/local/perl-5.6.1/lib/site_perl/5.6.1/sun4-solaris
    /usr/local/perl-5.6.1/lib/site_perl/5.6.1
    /usr/local/perl-5.6.1/lib/site_perl
    .

I was accessing the system using telnet with an 'ansi' terminal emulation.

Mike808/

---------------------------------------------
Valuenet Web Mail.
http://www.valuenet.net/




Thread Next


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