Bug#299606: fix warning in do_one_loop
Michael Ablassmeier
abi@grinser.de, 299606@bugs.debian.org
Tue, 15 Mar 2005 11:02:36 +0100
--BOKacYhQ+x31HxR3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Package: libnet-irc-perl
Severity: minor
Tags: patch
Version: 0.75-2
hi,
do_one_loop complains about an uninitialized value[0], im not sure what
the source of this problem is. It seems like on every 2nd run, if you
call do_one_loop repeately, caller(1) wont return anything. However,
attached patch makes do_one_loop only return and test $caller if its
actually defined.
[0]
Use of uninitialized value in string eq at /usr/share/perl5/Net/IRC.pm line 141.
bye,
- michael
--BOKacYhQ+x31HxR3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="IRC.pm.diff"
--- IRC.pm 2004-04-30 20:02:51.000000000 +0200
+++ IRC.pm.fixed 2005-03-15 10:29:15.832433728 +0100
@@ -138,7 +138,7 @@
# we don't want to bother waiting on input or running
# scheduled events if we're just flushing the output queue
# so we bail out here
- return if $caller eq 'Net::IRC::flush_output_queue';
+ return if defined($caller) and $caller eq 'Net::IRC::flush_output_queue';
# Check the queue for scheduled events to run.
if(!$self->schedulequeue->is_empty) {
--BOKacYhQ+x31HxR3--