解决方法
最简单的方法可能就是将文件写入临时目录,然后在写入完成后将其移动到真实目录.
或者你可以检查here.
JPEG::Error
[arguments: none] If the file reference remains undefined after a call to new,the file is to be considered not parseable by this module,and one should issue some error message and go to another file. An error message explaining the reason of the failure can be retrieved with the Error method:
编辑:
Image::TestJPG可能会更好.