Skip Menu |
 

This queue is for tickets about the LSF CPAN distribution.

Report information
The Basics
Id: 99278
Status: new
Priority: 0/
Queue: LSF

People
Owner: Nobody in particular
Requestors: westgate [...] cadence.com
Cc:
AdminCc:

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



Subject: LSF (v0.9) Queue Bug when running with RaiseError = 0 : ERROR: Use of uninitialized value $output[0] in split at .../perl5/LSF/Queue.pm line 23.
Date: Thu, 2 Oct 2014 10:42:20 -0700
To: "bug-LSF [...] rt.cpan.org" <bug-LSF [...] rt.cpan.org>
From: Keith Westgate <westgate [...] cadence.com>
Download (untitled) / with headers
text/plain 974b
I was calling LSF::Queue as below with RaiseError turned off. I get the following error: ERROR: Use of uninitialized value $output[0] in split at /home/westgate/work/dispatch/src/../perl/lib/perl5/LSF/Queue.pm line 23. that code looks like this : 18 sub new{ 19 my($class,@params) = @_; 20 my @output = $class->do_it('bqueues','-l',@params); 21 return unless @output; 22 my @queue; 23 for my $text (split(/^-+$/m,$output[0])){ the problem is the "return unless" at line 21 isn't working. Than because @output is getting set by the do_it call at line 20. I fixed it by changing it to this : return unless $output[0]; this is from version LSF-0.9. ======= my code ==== use LSF; sub ValidateQueue { LSF::Queue->PrintOutput(0); LSF::Queue->PrintError(0); LSF::Queue->RaiseError(0); my $qinfo; ($qinfo) = LSF::Queue->new( $_[0] ); return defined($qinfo); } ValidateQueue("no-such-queue");


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.