System error

error:  Error during compilation of /var/www/html/dhandler:
Can't call method "prepare" on an undefined value at /var/www/html/dhandler line 30.

Stack:
[/var/www/html/dhandler:30]
[/usr/share/perl5/HTML/Mason/Interp.pm:817]
[/usr/share/perl5/HTML/Mason/Interp.pm:445]
[/usr/share/perl5/HTML/Mason/Interp.pm:773]
[/usr/share/perl5/HTML/Mason/Request.pm:256]
[/usr/share/perl5/HTML/Mason/Request.pm:212]
[/usr/share/perl5/HTML/Mason/ApacheHandler.pm:94]
[/usr/share/perl5/Class/Container.pm:275]
[/usr/share/perl5/Class/Container.pm:353]
[/usr/share/perl5/HTML/Mason/Interp.pm:348]
[/usr/share/perl5/HTML/Mason/ApacheHandler.pm:874]
[/usr/share/perl5/HTML/Mason/ApacheHandler.pm:828]
[(eval 27):8]
[/var/www/html/dhandler:0]

context: 
... 
26: 
27:  <%once>
28:  our ($dbh);
29: 
30:  my $links = $dbh->prepare("SELECT link FROM links WHERE id=? OR name=?");
31:  </%once>
32: 
code stack:  /usr/share/perl5/HTML/Mason/Interp.pm:450
/usr/share/perl5/HTML/Mason/Interp.pm:773
/usr/share/perl5/HTML/Mason/Request.pm:256
/usr/share/perl5/HTML/Mason/Request.pm:212
/usr/share/perl5/HTML/Mason/ApacheHandler.pm:94
/usr/share/perl5/Class/Container.pm:275
/usr/share/perl5/Class/Container.pm:353
/usr/share/perl5/HTML/Mason/Interp.pm:348
/usr/share/perl5/HTML/Mason/ApacheHandler.pm:874
/usr/share/perl5/HTML/Mason/ApacheHandler.pm:828
(eval 27):8
-e:0
raw error






























Error during compilation of /var/www/html/dhandler:
Can't call method "prepare" on an undefined value at /var/www/html/dhandler line 30.

Stack:
  [/var/www/html/dhandler:30]
  [/usr/share/perl5/HTML/Mason/Interp.pm:817]
  [/usr/share/perl5/HTML/Mason/Interp.pm:445]
  [/usr/share/perl5/HTML/Mason/Interp.pm:773]
  [/usr/share/perl5/HTML/Mason/Request.pm:256]
  [/usr/share/perl5/HTML/Mason/Request.pm:212]
  [/usr/share/perl5/HTML/Mason/ApacheHandler.pm:94]
  [/usr/share/perl5/Class/Container.pm:275]
  [/usr/share/perl5/Class/Container.pm:353]
  [/usr/share/perl5/HTML/Mason/Interp.pm:348]
  [/usr/share/perl5/HTML/Mason/ApacheHandler.pm:874]
  [/usr/share/perl5/HTML/Mason/ApacheHandler.pm:828]
  [(eval 27):8]
  [/var/www/html/dhandler:0]



Trace begun at /usr/share/perl5/HTML/Mason/Interp.pm line 851
HTML::Mason::Interp::_compilation_error('HTML::Mason::Interp=HASH(0x7f76f07ab450)', '/var/www/html/dhandler', 'HTML::Mason::Exception::Compilation=HASH(0x7f76f08b2918)') called at /usr/share/perl5/HTML/Mason/Interp.pm line 450
HTML::Mason::Interp::load('HTML::Mason::Interp=HASH(0x7f76f07ab450)', '/dhandler') called at /usr/share/perl5/HTML/Mason/Interp.pm line 773
HTML::Mason::Interp::find_comp_upwards('HTML::Mason::Interp=HASH(0x7f76f07ab450)', '/14b', 'dhandler') called at /usr/share/perl5/HTML/Mason/Request.pm line 256
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 232
HTML::Mason::Request::_initialize('HTML::Mason::Request::ApacheHandler=HASH(0x7f76f0ae37e8)') called at /usr/share/perl5/HTML/Mason/Request.pm line 212
HTML::Mason::Request::new('HTML::Mason::Request::ApacheHandler', 'error_mode', 'output', 'error_format', 'html', 'interp', 'HTML::Mason::Interp=HASH(0x7f76f07ab450)', 'comp', '/14b', 'args', 'ARRAY(0x7f76f0bae3f0)', 'ah', 'HTML::Mason::ApacheHandler=HASH(0x7f76f0abb920)', 'apache_req', 'Apache2::RequestRec=SCALAR(0x55db4a25d558)', 'container', 'HASH(0x7f76f0b883a8)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 94
HTML::Mason::Request::ApacheHandler::new('HTML::Mason::Request::ApacheHandler', 'error_mode', 'output', 'error_format', 'html', 'interp', 'HTML::Mason::Interp=HASH(0x7f76f07ab450)', 'comp', '/14b', 'args', 'ARRAY(0x7f76f0bae3f0)', 'ah', 'HTML::Mason::ApacheHandler=HASH(0x7f76f0abb920)', 'apache_req', 'Apache2::RequestRec=SCALAR(0x55db4a25d558)', 'container', 'HASH(0x7f76f0b883a8)') called at /usr/share/perl5/Class/Container.pm line 275
Class::Container::call_method('HTML::Mason::Interp=HASH(0x7f76f07ab450)', 'request', 'new', 'interp', 'HTML::Mason::Interp=HASH(0x7f76f07ab450)', 'comp', '/14b', 'args', 'ARRAY(0x7f76f0bae3f0)', 'ah', 'HTML::Mason::ApacheHandler=HASH(0x7f76f0abb920)', 'apache_req', 'Apache2::RequestRec=SCALAR(0x55db4a25d558)', 'container', 'HASH(0x7f76f0b883a8)') called at /usr/share/perl5/Class/Container.pm line 353
Class::Container::create_delayed_object(undef, undef, 'interp', 'HTML::Mason::Interp=HASH(0x7f76f07ab450)', 'comp', '/14b', 'args', 'ARRAY(0x7f76f0bae3f0)', 'ah', 'HTML::Mason::ApacheHandler=HASH(0x7f76f0abb920)', 'apache_req', 'Apache2::RequestRec=SCALAR(0x55db4a25d558)', 'container', 'HASH(0x7f76f0b883a8)') called at /usr/share/perl5/HTML/Mason/Interp.pm line 348
HTML::Mason::Interp::make_request('HTML::Mason::Interp=HASH(0x7f76f07ab450)', 'comp', '/14b', 'args', 'ARRAY(0x7f76f0bae3f0)', 'ah', 'HTML::Mason::ApacheHandler=HASH(0x7f76f0abb920)', 'apache_req', 'Apache2::RequestRec=SCALAR(0x55db4a25d558)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 874
eval {...} at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 873
HTML::Mason::ApacheHandler::prepare_request('HTML::Mason::ApacheHandler=HASH(0x7f76f0abb920)', 'Apache2::RequestRec=SCALAR(0x55db4a25d558)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 828
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x7f76f0abb920)', 'Apache2::RequestRec=SCALAR(0x55db4a25d558)') called at (eval 27) line 8
HTML::Mason::ApacheHandler::handler('HTML::Mason::ApacheHandler', 'Apache2::RequestRec=SCALAR(0x55db4a25d558)') called at -e line 0
eval {...} at -e line 0