Re: ERROR: Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/site_perl/5.8.8/Test/Parser/Dbt2.pm line 521.

From: Rajesh Kumar Mallah <mallah(dot)rajesh(at)gmail(dot)com>
To: Rohan Pethkar <rohanpethkar(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: ERROR: Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/site_perl/5.8.8/Test/Parser/Dbt2.pm line 521.
Date: 2009-02-10 14:36:50
Message-ID: a97c77030902100636p44eb3a83occ1efdf672e8d5f8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> Can't use an undefined value as an ARRAY reference at
> /usr/lib/perl5/site_perl/5.8.8/Test/Parser/Dbt2.pm line 521.
>
> Can someone please give inputs to resolve this issue? Any help on this will
> be appreciated.

519 sub transactions {
520 my $self = shift;
521 return @{$self->{data}->{transactions}->{transaction}};
522 }

the stuff in $self->{data}->{transactions}->{transaction} is not defined
so it cannot be dereferenced. If you want to just escape this error you
may modify the code as:

if ($self->{data}->{transactions}->{transaction}) {
return @{$self->{data}->{transactions}->{transaction}};
} else {
return ();
}

however understanding the root cause is recommended.

>
> Thanks in advance.
>
> Thanks,
> Rohan
>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2009-02-10 15:00:54 Re: query slow only after reboot
Previous Message Rajesh Kumar Mallah 2009-02-10 14:29:42 Re: query becomes fas on 'SET enable_hashjoin TO off;'