in reply to CGI::Application file upload Assertion error with Data::Dumper

Do you realize you're running a debug build of Perl? That makes it slower. On the plus side, the checks that it slower is what found the problem and tells us exactly where the problem occurred.

Specifically, on a blank line. Line 1741 of Perl 5.10.0's sv.c is a blank line.

You don't appear to running stock Perl. Without having the sources that were used to build your Perl, all we can tell is that some function is supposed to be passed a scalar that contains a string (i.e. a scalar with SVf_POK set), but it was passed something different.

This is either a bug in Perl, or a bug in an XS module. Try upgrading to Perl 5.10.1. Lots of bugs were fixed in 5.10.1.

However, there's a good chance it's related to the unresolved bug you mentioned. The file handle fields from CGI are very special. They act as a string or a file handle depending on how you use them. The ticket talks of globs, and globs are closely related to file handles. Can you somehow avoid including this field in the session?

Update: Added last paragraph.

  • Comment on Re: CGI::Application file upload Assertion error with Data::Dumper
  • Download Code

Replies are listed 'Best First'.
Re^2: CGI::Application file upload Assertion error with Data::Dumper
by gman (Friar) on Dec 18, 2009 at 19:36 UTC
    I am compiling 5.10.1 now.

    Concerning your last paragraph, I have tried using $self->session->clear('bulk_file') with no luck. Is that what you meant?

    Next step I will build a smaller script using CGI::App & Session and see if I can reproduce, thats if the upgrade does not fix my problem.

    Thanks again for yours and faber's help

      Ok after further testing, once the FH 'bulk_file' => bless( \*{'Fh::fh00001Giant.odt'}, 'Fh' ) is in the cgi session file, things go astray. As stated in my update, which probably should have gone down here, I have tried to clear the 'bulk_upload' FH from the session. I also tried this in the post run with no success.

      Does anyone know of the correct way to delete the FH from the session or a way to force clean up after a "clear"?

      Thanks