if ( !@termcap_path || !$entry ) { # last resort--fake up a termcap from terminfo local $ENV{TERM} = $term; if ( $^O eq 'VMS' ) { $entry = $VMS_TERMCAP; } else { if ( grep { -x "$_/infocmp" } split /:/, $ENV{PATH} ) { # op fix; $ENV{PATH} = "/usr/bin:..."; eval { my $tmp = `infocmp -C 2>/dev/null`; $tmp =~ s/^#.*\n//gm; # remove comments if ( ( $tmp !~ m%^/%s ) && ( $tmp =~ /(^|\|)${termpat}[:|]/s ) ) { $entry = $tmp; } }; warn "Can't run infocmp to get a termcap entry: $@" if $@; } else { # this is getting desperate now if ( $self->{TERM} eq 'dumb' ) { $entry = 'dumb|80-column dumb tty::am::co#80::bl=^G:cr=^M:do=^J:sf=^J:'; } } } } croak "Can't find a valid termcap file" unless @termcap_path || $entry;