[Catalyst] Problem with BindLex panicking for nothing...
kakimoto at tpg.com.au
kakimoto at tpg.com.au
Tue Aug 5 12:56:48 BST 2008
Hi, guys,
The URL used was
"http://www.select-a-bank-loan.com:3000/loanss/list?id=338".
For some silly reason, a call with a parameter of "id" causes this issue of
"[error] Caught exception in myApp::Controller::Loans->list "Exception
Caught->panic: Can't find ARRAY(0x8a068fc) in the the caller's lexical
pad at /usr/local/share/perl/5.8.8/Catalyst/Controller/BindLex.pm line 103."
I see no reason why BindLex should ever panic or be called in this
instance.. I am just dealing with a freaking param('id') element.
[1] Here's the bit of code that I have...
========================
sub list :Local {
my ($self, $c) = @_;
# make sure we set the user object to the stash.
## $c->flash->{'user'} = $c->user;
my $user: Stashed = $c->user;
my $view_specific_loan_id = $c->request->param('id');
$c->log->debug("...we now have a ID of " . $view_specific_loan_id);
if (defined($view_specific_loan_id) and $view_specific_loan_id =~
m/^\d+$/)
{
my @loans : Stashed = $c->model('myAppDB::Listing')->search(
agent_id => $c->user(),
{
'order_by' => 'id DESC',
}
);
}
else
{
my @loans : Stashed = $c->model('myAppDB::Listing')->search(
agent_id => $c->user(),
{
'order_by' => 'id DESC',
}
);
}
$c->stash->{'template'} = 'loans/list.tt2';
}
[2] Here is what the output looks like
========================
[debug] Query Parameters are:
.-------------------------------------+--------------------------------------.
| Parameter | Value
|
+-------------------------------------+--------------------------------------+
| id | 338
|
'-------------------------------------+--------------------------------------'
[debug] "GET" request for "loans/list" from "......"
[debug] Found sessionid "ecd9d0422eef2160feeac8eac0c499666b684b77" in cookie
[debug] Path is "loans/list"
[debug] Restored session "ecd9d0422eef2160feeac8eac0c499666b684b77"
[debug] ...we now have a ID of 338
[error] Caught exception in gozila::Controller::Listings->list
"Exception Caught->panic: Can't find ARRAY(0x8a068fc) in the the
caller's lexical pad at
/usr/local/share/perl/5.8.8/Catalyst/Controller/BindLex.pm line 103."
[info] Request took 0.770688s (1.298/s)
Please help....
More information about the Catalyst
mailing list