System error

error:  Can't call method "getState_id" on an undefined value at /web/inter2/htdocs/ca/dhandler line 39.
context: 
... 
35:  $city =~ s/%20/_/g;
36: 
37:  my $regions = $m->comp('/funcs/getLocHash.imhtml:getRegions', country=>$country, state=>$state, city=>$city );
38:  #warn "DEBUG: region - $regions->[0]";
39:  my $stateobj = $api->getStateById($regions->[0]->getState_id());
40:  my $cityobj = $api->getCityById($regions->[0]->getCity_id());
41: 
42: 
43:  if( $prop ) {
... 
code stack:  /web/inter2/htdocs/ca/dhandler:39
raw error






























Can't call method "getState_id" on an undefined value at /web/inter2/htdocs/ca/dhandler line 39.


Trace begun at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('Can\'t call method "getState_id" on an undefined value at /web/inter2/htdocs/ca/dhandler line 39.^J') called at /web/inter2/htdocs/ca/dhandler line 39
HTML::Mason::Commands::__ANON__ at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x244e380)') called at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 1279
eval {...} at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 1274
HTML::Mason::Request::comp(undef, undef, undef) called at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 473
eval {...} at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 473
eval {...} at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 425
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0x1f02750)') called at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/ApacheHandler.pm line 168
HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0x1f02750)') called at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/ApacheHandler.pm line 825
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x1ffcb80)', 'Apache=SCALAR(0x1f4fb40)') called at /usr/local/mason/handler.pl line 108
HTML::Mason::handler('Apache=SCALAR(0x1f4fb40)') called at /dev/null line 0
eval {...} at /dev/null line 0