System error

error:  Can't call method "write" on an undefined value at /rtx/pshark/mason_v2/RFS/components/image.html line 42, <MAPFILE> line 31321.
context: 
... 
38: 
39:  if ($type eq "photo") {
40:  $image->read(data => $data->{image_data});
41:  $image = $image->scale(xpixels => 200, ypixels => 200, type => 'min') unless $noresize;
42:  $image->write(type => 'jpeg', data => \$content);
43: 
44:  $m->comp("SELF:show_image", content => $content, expires => $expires);
45:  } elsif ($type eq "fp") {
46:  if ($data->{mime_type} =~ /pdf/i) {
... 
code stack:  /rtx/pshark/mason_v2/RFS/components/image.html:42
/rtx/pshark/mason_v2/minhandler:204
raw error






























Can't call method "write" on an undefined value at /rtx/pshark/mason_v2/RFS/components/image.html line 42, <MAPFILE> line 31321.


Trace begun at /opt/perl/lib/site_perl/5.10.0/HTML/Mason/Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('Can\'t call method "write" on an undefined value at /rtx/pshark/mason_v2/RFS/components/image.html line 42, <MAPFILE> line 31321.^J') called at /rtx/pshark/mason_v2/RFS/components/image.html line 42
HTML::Mason::Commands::__ANON__('type', 'photo', 'id', 3892182) called at /opt/perl/lib/site_perl/5.10.0/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xf791de8)', 'type', 'photo', 'id', 3892182) called at /opt/perl/lib/site_perl/5.10.0/HTML/Mason/Request.pm line 1284
eval {...} at /opt/perl/lib/site_perl/5.10.0/HTML/Mason/Request.pm line 1274
HTML::Mason::Request::comp(undef, undef, undef, 'type', 'photo', 'id', 3892182) called at /opt/perl/lib/site_perl/5.10.0/HTML/Mason/Request.pm line 943
HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheHandler=HASH(0xfebfb18)') called at /rtx/pshark/mason_v2/minhandler line 204
HTML::Mason::Commands::__ANON__('type', 'photo', 'id', 3892182) called at /opt/perl/lib/site_perl/5.10.0/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xc2b8500)', 'type', 'photo', 'id', 3892182) called at /opt/perl/lib/site_perl/5.10.0/HTML/Mason/Request.pm line 1279
eval {...} at /opt/perl/lib/site_perl/5.10.0/HTML/Mason/Request.pm line 1274
HTML::Mason::Request::comp(undef, undef, undef, 'type', 'photo', 'id', 3892182) called at /opt/perl/lib/site_perl/5.10.0/HTML/Mason/Request.pm line 473
eval {...} at /opt/perl/lib/site_perl/5.10.0/HTML/Mason/Request.pm line 473
eval {...} at /opt/perl/lib/site_perl/5.10.0/HTML/Mason/Request.pm line 425
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0xfebfb18)') called at /opt/perl/lib/site_perl/5.10.0/HTML/Mason/ApacheHandler.pm line 168
HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0xfebfb18)') called at /opt/perl/lib/site_perl/5.10.0/HTML/Mason/ApacheHandler.pm line 825
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0xbfb6fd0)', 'Apache2::RequestRec=SCALAR(0x10614140)') called at (eval 1097) line 8
HTML::Mason::ApacheHandler::handler('HTML::Mason::ApacheHandler', 'Apache2::RequestRec=SCALAR(0x10614140)') called at -e line 0
eval {...} at -e line 0