System error

error:  Can't call method "epoch" on an undefined value at /home/sites/akto/htdocs/newsletter/archive/dhandler line 49.
context: 
... 
45: 
46:  <%init>
47:  my $now = Time::Piece->new;
48:  my $mon = Time::Piece->from_mysql_date("$year-$month-01");
49:  return if $mon->epoch > $now->epoch;
50: 
51:  use Calendar::Simple;
52:  my @cal = calendar($month, $year);
53:  </%init>
... 
code stack:  /home/sites/akto/htdocs/newsletter/archive/dhandler:49
/home/sites/akto/htdocs/newsletter/archive/dhandler:15
/usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm:814
/home/sites/akto/htdocs/newsletter/archive/dhandler:14
/home/sites/akto/htdocs/newsletter/autohandler:14
/home/sites/akto/htdocs/autohandler:97
raw error






























Can't call method "epoch" on an undefined value at /home/sites/akto/htdocs/newsletter/archive/dhandler line 49.


Trace begun at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('Can\'t call method "epoch" on an undefined value at /home/sites/akto/htdocs/newsletter/archive/dhandler line 49.^J') called at /home/sites/akto/htdocs/newsletter/archive/dhandler line 49
HTML::Mason::Commands::__ANON__('year', 0, 'month', 1) called at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::Subcomponent=HASH(0x9fbbeec)', 'year', 0, 'month', 1) called at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 1262
eval {...} at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 1252
HTML::Mason::Request::comp(undef, undef, undef, 'year', 0, 'month', 1) called at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 1310
HTML::Mason::Request::scomp('HTML::Mason::Request::ApacheHandler=HASH(0xa0ff4d0)', 'SELF:.view_month', 'year', 0, 'month', 1) called at /home/sites/akto/htdocs/newsletter/archive/dhandler line 15
HTML::Mason::Commands::__ANON__ at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x9fbbec8)') called at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 885
eval {...} at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 884
HTML::Mason::Request::call_self('HTML::Mason::Request::ApacheHandler=HASH(0xa0ff4d0)', 'SCALAR(0x8be5af0)', 'ARRAY(0x8be5b20)', 'SCALAR(0x8be5b08)', 'CACHE_SELF') called at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 814
HTML::Mason::Request::cache_self('HTML::Mason::Request::ApacheHandler=HASH(0xa0ff4d0)', 'key', 0, 'expires_in', '1 day') called at /home/sites/akto/htdocs/newsletter/archive/dhandler line 14
HTML::Mason::Commands::__ANON__ at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x9fbbec8)') called at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 1262
eval {...} at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 1252
HTML::Mason::Request::comp(undef, undef, undef) called at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 921
HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheHandler=HASH(0xa0ff4d0)') called at /home/sites/akto/htdocs/newsletter/autohandler line 14
HTML::Mason::Commands::__ANON__ at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xa0621cc)') called at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 1257
eval {...} at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 1252
HTML::Mason::Request::comp(undef, undef, undef) called at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 921
HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheHandler=HASH(0xa0ff4d0)') called at /home/sites/akto/htdocs/autohandler line 97
HTML::Mason::Commands::__ANON__ at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x94e74f4)') called at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 1257
eval {...} at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 1252
HTML::Mason::Request::comp(undef, undef, undef) called at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 466
eval {...} at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 466
eval {...} at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 418
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0xa0ff4d0)') called at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/ApacheHandler.pm line 168
HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0xa0ff4d0)') called at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/ApacheHandler.pm line 826
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x92f5524)', 'Apache=SCALAR(0xa06bec8)') called at (eval 82) line 8
HTML::Mason::ApacheHandler::handler('HTML::Mason::ApacheHandler', 'Apache=SCALAR(0xa06bec8)') called at /dev/null line 0
eval {...} at /dev/null line 0