Skip Menu |

This queue is for tickets about the UI-Dialog CPAN distribution.

Report information
The Basics
Id: 7037
Status: resolved
Worked: 15 min
Priority: 0/
Queue: UI-Dialog

People
Owner: kevin [...] krinke.ca
Requestors: ccurtis [...] verisign.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.06
Fixed in: (no value)



Subject: checklist with no selection breaks
Creating a checklist, then selecting zero items from the list gives this error: Can't use an undefined value as an ARRAY reference at /usr/local/share/perl/5.8.4/UI/Dialog/Backend.pm line 107. Debian machine, UI:Dialog 1.06, perl v5.8.4 Test code: #!/usr/bin/perl -w use UI::Dialog; $d = new UI::Dialog(); @selected = $d->checklist( text => 'herk', list => [ 'test', ['foobar', 0], 'bork', ['barfoo', 0] ] ); print "@selected\n";
This patch should fix the issue as well as update the version number to 1.07. Please test and respond so that I can make an immediate release and close this bug. -- Kevin C. Krinke <kckrinke@opendoorsoftware.com> Open Door Software Inc.
diff -x CVS -ru ./Changes ../UI-Dialog/Changes --- ./Changes 2004-03-18 10:59:51.000000000 -0500 +++ ../UI-Dialog/Changes 2004-07-21 14:53:51.000000000 -0400 @@ -1,3 +1,8 @@ +1.07 - Wed, 21 Jul 2004 14:52:30 -0500 + * Bugfix for checklist failing to work with an empty user selection + + -- Kevin C. Krinke <kckrinke@opendoorsoftware.com> + 1.06 - Thu, 18 Mar 2004 10:55:24 -0500 * Bugfix for dynamic path discovery. diff -x CVS -ru ./META.yml ../UI-Dialog/META.yml --- ./META.yml 2004-03-18 11:00:02.000000000 -0500 +++ ../UI-Dialog/META.yml 2004-07-21 15:22:52.000000000 -0400 @@ -1,7 +1,7 @@ # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: UI-Dialog -version: 1.06 +version: 1.07 version_from: lib/UI/Dialog.pm installdirs: site requires: diff -x CVS -ru ./lib/UI/Dialog/Backend/ASCII.pm ../UI-Dialog/lib/UI/Dialog/Backend/ASCII.pm --- ./lib/UI/Dialog/Backend/ASCII.pm 2004-03-18 10:59:51.000000000 -0500 +++ ../UI-Dialog/lib/UI/Dialog/Backend/ASCII.pm 2004-07-21 15:27:57.000000000 -0400 @@ -25,7 +25,7 @@ BEGIN { use vars qw( $VERSION @ISA ); @ISA = qw( UI::Dialog::Backend ); - $VERSION = '1.06'; + $VERSION = '1.07'; } $| = 1; # turn on autoflush diff -x CVS -ru ./lib/UI/Dialog/Backend/CDialog.pm ../UI-Dialog/lib/UI/Dialog/Backend/CDialog.pm --- ./lib/UI/Dialog/Backend/CDialog.pm 2004-03-18 10:59:51.000000000 -0500 +++ ../UI-Dialog/lib/UI/Dialog/Backend/CDialog.pm 2004-07-21 15:27:57.000000000 -0400 @@ -27,7 +27,7 @@ BEGIN { use vars qw( $VERSION @ISA ); @ISA = qw( UI::Dialog::Backend ); - $VERSION = '1.06'; + $VERSION = '1.07'; } #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: diff -x CVS -ru ./lib/UI/Dialog/Backend/GDialog.pm ../UI-Dialog/lib/UI/Dialog/Backend/GDialog.pm --- ./lib/UI/Dialog/Backend/GDialog.pm 2004-03-18 10:59:51.000000000 -0500 +++ ../UI-Dialog/lib/UI/Dialog/Backend/GDialog.pm 2004-07-21 15:27:57.000000000 -0400 @@ -25,7 +25,7 @@ BEGIN { use vars qw( $VERSION @ISA ); @ISA = qw( UI::Dialog::Backend ); - $VERSION = '1.06'; + $VERSION = '1.07'; } #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: diff -x CVS -ru ./lib/UI/Dialog/Backend/KDialog.pm ../UI-Dialog/lib/UI/Dialog/Backend/KDialog.pm --- ./lib/UI/Dialog/Backend/KDialog.pm 2004-03-18 10:59:51.000000000 -0500 +++ ../UI-Dialog/lib/UI/Dialog/Backend/KDialog.pm 2004-07-21 15:27:57.000000000 -0400 @@ -25,7 +25,7 @@ BEGIN { use vars qw( $VERSION @ISA ); @ISA = qw( UI::Dialog::Backend ); - $VERSION = '1.06'; + $VERSION = '1.07'; } #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: diff -x CVS -ru ./lib/UI/Dialog/Backend/Nautilus.pm ../UI-Dialog/lib/UI/Dialog/Backend/Nautilus.pm --- ./lib/UI/Dialog/Backend/Nautilus.pm 2004-03-18 10:59:51.000000000 -0500 +++ ../UI-Dialog/lib/UI/Dialog/Backend/Nautilus.pm 2004-07-21 15:27:57.000000000 -0400 @@ -27,7 +27,7 @@ BEGIN { use vars qw($VERSION); - $VERSION = '1.06'; + $VERSION = '1.07'; } sub new { diff -x CVS -ru ./lib/UI/Dialog/Backend/Whiptail.pm ../UI-Dialog/lib/UI/Dialog/Backend/Whiptail.pm --- ./lib/UI/Dialog/Backend/Whiptail.pm 2004-03-18 10:59:51.000000000 -0500 +++ ../UI-Dialog/lib/UI/Dialog/Backend/Whiptail.pm 2004-07-21 15:27:57.000000000 -0400 @@ -26,7 +26,7 @@ BEGIN { use vars qw( $VERSION @ISA ); @ISA = qw( UI::Dialog::Backend ); - $VERSION = '1.06'; + $VERSION = '1.07'; } #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: diff -x CVS -ru ./lib/UI/Dialog/Backend/XDialog.pm ../UI-Dialog/lib/UI/Dialog/Backend/XDialog.pm --- ./lib/UI/Dialog/Backend/XDialog.pm 2004-03-18 10:59:51.000000000 -0500 +++ ../UI-Dialog/lib/UI/Dialog/Backend/XDialog.pm 2004-07-21 15:27:57.000000000 -0400 @@ -27,7 +27,7 @@ BEGIN { use vars qw( $VERSION @ISA ); @ISA = qw( UI::Dialog::Backend ); - $VERSION = '1.06'; + $VERSION = '1.07'; } #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: diff -x CVS -ru ./lib/UI/Dialog/Backend/XOSD.pm ../UI-Dialog/lib/UI/Dialog/Backend/XOSD.pm --- ./lib/UI/Dialog/Backend/XOSD.pm 2004-03-18 10:59:51.000000000 -0500 +++ ../UI-Dialog/lib/UI/Dialog/Backend/XOSD.pm 2004-07-21 15:27:57.000000000 -0400 @@ -35,7 +35,7 @@ BEGIN { use vars qw( $VERSION @ISA ); @ISA = qw( UI::Dialog::Backend ); - $VERSION = '1.06'; + $VERSION = '1.07'; } sub new { diff -x CVS -ru ./lib/UI/Dialog/Backend/Zenity.pm ../UI-Dialog/lib/UI/Dialog/Backend/Zenity.pm --- ./lib/UI/Dialog/Backend/Zenity.pm 2004-03-18 10:59:51.000000000 -0500 +++ ../UI-Dialog/lib/UI/Dialog/Backend/Zenity.pm 2004-07-21 15:27:57.000000000 -0400 @@ -26,7 +26,7 @@ BEGIN { use vars qw( $VERSION @ISA ); @ISA = qw( UI::Dialog::Backend ); - $VERSION = '1.06'; + $VERSION = '1.07'; } #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: diff -x CVS -ru ./lib/UI/Dialog/Backend.pm ../UI-Dialog/lib/UI/Dialog/Backend.pm --- ./lib/UI/Dialog/Backend.pm 2004-03-18 10:59:51.000000000 -0500 +++ ../UI-Dialog/lib/UI/Dialog/Backend.pm 2004-07-21 15:27:57.000000000 -0400 @@ -25,7 +25,7 @@ BEGIN { use vars qw($VERSION); - $VERSION = '1.06'; + $VERSION = '1.07'; } #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -104,6 +104,7 @@ $self->_debug((join(" | ",(caller())))." > ra() > rset: ".((@_) ? "@_" : 'NULL'),3); $self->{'_state'}->{'ra'} = ($_[0] =~ /^null$/i) ? [ 0 ] : [ @_ ] unless not @_; my $aref = $self->{'_state'}->{'ra'}; + ref($aref) eq "ARRAY" or $aref = []; return(@{$aref}); } diff -x CVS -ru ./lib/UI/Dialog/Console.pm ../UI-Dialog/lib/UI/Dialog/Console.pm --- ./lib/UI/Dialog/Console.pm 2004-03-18 10:59:51.000000000 -0500 +++ ../UI-Dialog/lib/UI/Dialog/Console.pm 2004-07-21 15:27:57.000000000 -0400 @@ -24,7 +24,7 @@ BEGIN { use vars qw( $VERSION @ISA ); @ISA = qw( UI::Dialog ); - $VERSION = '1.06'; + $VERSION = '1.07'; } #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: diff -x CVS -ru ./lib/UI/Dialog/GNOME.pm ../UI-Dialog/lib/UI/Dialog/GNOME.pm --- ./lib/UI/Dialog/GNOME.pm 2004-03-18 10:59:51.000000000 -0500 +++ ../UI-Dialog/lib/UI/Dialog/GNOME.pm 2004-07-21 15:27:57.000000000 -0400 @@ -24,7 +24,7 @@ BEGIN { use vars qw( $VERSION @ISA ); @ISA = qw( UI::Dialog ); - $VERSION = '1.06'; + $VERSION = '1.07'; } #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: diff -x CVS -ru ./lib/UI/Dialog/Gauged.pm ../UI-Dialog/lib/UI/Dialog/Gauged.pm --- ./lib/UI/Dialog/Gauged.pm 2004-03-18 10:59:51.000000000 -0500 +++ ../UI-Dialog/lib/UI/Dialog/Gauged.pm 2004-07-21 15:27:57.000000000 -0400 @@ -22,7 +22,7 @@ BEGIN { use vars qw($VERSION); - $VERSION = '1.06'; + $VERSION = '1.07'; } #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: diff -x CVS -ru ./lib/UI/Dialog/KDE.pm ../UI-Dialog/lib/UI/Dialog/KDE.pm --- ./lib/UI/Dialog/KDE.pm 2004-03-18 10:59:51.000000000 -0500 +++ ../UI-Dialog/lib/UI/Dialog/KDE.pm 2004-07-21 15:27:57.000000000 -0400 @@ -24,7 +24,7 @@ BEGIN { use vars qw( $VERSION @ISA ); @ISA = qw( UI::Dialog ); - $VERSION = '1.06'; + $VERSION = '1.07'; } #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: diff -x CVS -ru ./lib/UI/Dialog.pm ../UI-Dialog/lib/UI/Dialog.pm --- ./lib/UI/Dialog.pm 2004-03-18 10:59:51.000000000 -0500 +++ ../UI-Dialog/lib/UI/Dialog.pm 2004-07-21 15:27:57.000000000 -0400 @@ -22,7 +22,7 @@ BEGIN { use vars qw($VERSION); - $VERSION = '1.06'; + $VERSION = '1.07'; } #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
From: ccurtis [...] verisign.com
[KCK - Wed Jul 21 15:32:06 2004]: Show quoted text
> This patch should fix the issue as well as update the version number > to > 1.07. Please test and respond so that I can make an immediate release > and close this bug.
Test worked fine with 1.07. The patch worked great. Thanks, Chris