Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Why does this code fail??

Cyberqat
2011-01-10
2013-05-22
  • Cyberqat
    Cyberqat
    2011-01-10

    Alright, i am tearing my hair out.  This is copied almost verbatim from a working example, but generates the following output:

    About to call foo
      /nphos/ : Perl execution failed

    Code is here.

    index.cgi:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    #!/opt/local/bin/perl
    require 'foobar-lib.pl';
    ui_print_header(undef, 'My Module', '');
    print STDERR "About to call foo\n";
    my @lines = foo();
    print STDERR "After call to foo\n";
    print "lines = @lines \n";
    print "<UL>";
    foreach $line (@lines) {
       print ("<li>",$line,"</li>");
    }
    print "</UL>";
    ui_print_footer(undef,"footer");
    

    nphos-lib.pl:

    =head1 nphos-lib.pl
    =cut
    use WebminCore;
    init_config();
    =head2 foo()
    Resturns all RedDwarf config values
    =cut
    sub foo
    {
    @foo = ("foo","bar","belch");
    print STDERR "sub @foo";
    return @foo;
    }
    1;
    

    I've been banging my head against this all night.  help?

     
  • Cyberqat
    Cyberqat
    2011-01-10

    Never mind found the problem. Importing the wrong file. duh.

    Would be nice if there was a way to get the actual die messages into the error output log :/