System error

error:  Can't call method "select_value_hash" on an undefined value at /var/www/newTurizm/turizm.ru/Libs/Pages/Pages.pm line 593.
context: 
... 
589:  my $key = qq~id_${page_id}_${state}~;
590:  my $list = $list_cache->get($key);
591:  unless ($list) {
592:  my $db = $self->{db}->{TURIZM};
593:  $list= $db->select_value_hash(qq~select p.*, DATE_FORMAT(p.date,"%d") as d, DATE_FORMAT(p.date,'%m') as m, DATE_FORMAT(p.date,'%Y') as y, c.code , cc.code as code_parent FROM ce_page p, ce_category c, ce_category cc where $state=? and c.id = p.cid and c.cid=cc.id and p.state="1" $cid~,$page_id);
594:  $list_cache->set($key, $list);
595:  }
596: 
597:  return $list;
... 
code stack:  /var/www/newTurizm/turizm.ru/Libs/Pages/Pages.pm:593
/var/www/newTurizm/turizm.ru/html/Comp/index/main_index.msn:696
/var/www/newTurizm/turizm.ru/html/dhandler:2
/var/www/newTurizm/turizm.ru/html/Comp/out_filter.msn:8
/var/www/newTurizm/turizm.ru/html/dhandler:4
raw error






























Can't call method "select_value_hash" on an undefined value at /var/www/newTurizm/turizm.ru/Libs/Pages/Pages.pm line 593.


Trace begun at /usr/share/perl5/HTML/Mason/Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('Can\'t call method "select_value_hash" on an undefined value at /var/www/newTurizm/turizm.ru/Libs/Pages/Pages.pm line 593.^J') called at /var/www/newTurizm/turizm.ru/Libs/Pages/Pages.pm line 593
Pages::Pages::get_page_by_id('Pages::Pages=HASH(0x7fc4b23a2c78)', 'turizm_v_pakistane') called at /var/www/newTurizm/turizm.ru/html/Comp/index/main_index.msn line 696
HTML::Mason::Commands::__ANON__('BASE_PATH', 'MAIN') called at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7fc4b2b6ebb8)', 'BASE_PATH', 'MAIN') called at /usr/share/perl5/HTML/Mason/Request.pm line 1302
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, 'BASE_PATH', 'MAIN') called at /var/www/newTurizm/turizm.ru/html/dhandler line 2
HTML::Mason::Commands::__ANON__ at /usr/share/perl5/HTML/Mason/Request.pm line 1380
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1380
HTML::Mason::Request::content('HTML::Mason::Request::ApacheHandler=HASH(0x7fc4b2dd7220)') called at /var/www/newTurizm/turizm.ru/html/Comp/out_filter.msn line 8
HTML::Mason::Commands::__ANON__ at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7fc4b2ceb650)') called at /usr/share/perl5/HTML/Mason/Request.pm line 1302
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef) called at /var/www/newTurizm/turizm.ru/html/dhandler line 4
HTML::Mason::Commands::__ANON__ at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7fc4b2cce158)') called at /usr/share/perl5/HTML/Mason/Request.pm line 1297
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef) called at /usr/share/perl5/HTML/Mason/Request.pm line 481
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 481
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 433
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0x7fc4b2dd7220)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 168
HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0x7fc4b2dd7220)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 825
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x7fc4b2740188)', 'Apache2::RequestRec=SCALAR(0x7fc4b2cad788)') called at /etc/apache2/handler.pl line 43
Turizm::Mason::handler('Apache2::RequestRec=SCALAR(0x7fc4b2cad788)') called at -e line 0
eval {...} at -e line 0