Skip Menu |

This queue is for tickets about the sol-inst CPAN distribution.

Report information
The Basics
Id: 2515
Status: new
Priority: 0/
Queue: sol-inst

People
Owner: Nobody in particular
Requestors: matt.kleifgen [...] wnco.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.90
Fixed in: (no value)



Subject: Contents module
if Solaris::Contents->pkgs($file) is called where $file is not part of a package an error is generated. Can't use an undefined value as and ARRAY refernce at Contents.pm line 133. The context diff I included tests the var before the return @{$self->{...} } for being defined, and returns () otherwise. cheers, Matt Kleifgen
*** Contents.old Tue May 6 12:17:59 2003 --- Contents.pm Tue May 6 12:17:40 2003 *************** *** 130,136 **** sub pkgs { my ($self,$file)=@_; ! return(@{$self->{"db"}->{$file}->{"pkgs"}}); } # --- 130,140 ---- sub pkgs { my ($self,$file)=@_; ! if (defined(my $pkgs = $self->{"db"}->{$file}->{"pkgs"})) { ! return(@{$self->{"db"}->{$file}->{"pkgs"}}); ! } else { ! return (); ! } } #