Modem::Vgetty problem

Jan Kasprzak (kas@informatics.muni.cz)
Wed, 18 Aug 1999 18:30:21 +0200


Marc SCHAEFER wrote:
: 
: > 08/17 14:12:03 yS0    US Robotics: Use of uninitialized value at
: > /usr/lib/perl5/site_perl/Modem/Vgetty.pm line 113, <GEN0> chunk 3.
: 
: I am surprised. This is a perl error message. How is this sent to the
: US Robotics modem (since this looks what is happening: this is the
: *MODEM* echo).  Or it's just stderr of the perl script which is intermixed
: with vgetty log.  If you are good at perl (which I am not), you
: could try to fix the Vgetty.pm.
: 
	My fault (core dumped). Please apply this patch:

Index: Vgetty.pm
===================================================================
RCS file: /home/kas/home1/CVSROOT/Modem-Vgetty/Vgetty.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Vgetty.pm	1999/06/08 08:42:46	1.15
+++ Vgetty.pm	1999/08/18 16:26:19	1.16
@@ -99,7 +99,8 @@
 
 sub expect {
 	my $self = shift;
-	$self->{LOG}->print("expecting: ", (join '|', @_), "\n");
+	$self->{LOG}->print("expecting: ", (join '|', @_), "\n")
+		if $testing > 0;
 	my $received = $self->receive || return undef;
 	for my $expected (@_) {
 		return $received if $received eq $expected;

	It tried to write to non-existing filehandle. :-(

: mvm redirects 2> to another log file, for example. That maybe should be
: done by your perl script (but I don't know how to do it) so to make
: the log clearer.

	$Modem::Vgetty::testing = 1;
	$Modem::Vgetty::log_file = '/my/log/file';

	Hope this helps,

-Yenya

-- 
\ Jan "Yenya" Kasprzak <kas at fi.muni.cz>       http://www.fi.muni.cz/~kas/
\\ PGP: finger kas at aisa.fi.muni.cz   0D99A7FB206605D7 8B35FCDE05B18A5E //
\\\             Czech Linux Homepage:  http://www.linux.cz/              ///
| The case with NT is the most spectacular.  Seems, they have at least two |
| independant teams.  One introduces bugs, another invents workarounds.    |
| Silly bugs are followed by ugly workarounds. 8)       --Alexey Kuznetsov |