Writing New Modules - header problem

Usermin
M Hopcroft
2007-01-27
2013-05-21
  • M Hopcroft
    M Hopcroft
    2007-01-27

    I'm writing a new usermin module. To begin, I copied the "plan" module, modified the lang files, the module.info, etc. The new module shows up in usermin correctly. However, when I begin my index.cgi with &ui_print_header, the first page hangs when loading halfway through the usermin toolbar. If I do not use &ui_print_header, the resulting page loads correctly (without the usermin toolbars). The full statement is:

    &ui_print_header(undef, $text{'index_title'}, "", undef, 0, 1);

    This is copied straight out of the plan module (which works fine). Anyone have any ideas? Or any ideas about how to troubleshoot? The log files don't seem to have any relevant error messages. Thanks!

    usermin 1.220 on Mac OS X 10.3

     
    • M Hopcroft
      M Hopcroft
      2007-01-27

      Well, after working on it for a week, I gave up and posted here. 10 minutes later, I figured out the solution. I was using:

      #!/usr/bin/perl -w

      Apparently the -w switch is incompatible with some part of the usermin library. So remove -w, and no problem. -w is "print warnings", so maybe it was printing a warning that interfered with the cgi output??