81 Content_Type => 'form-data',Content => \%URLParameters); |
81 Content_Type => 'form-data',Content => \%URLParameters); |
82 my $Response = $Agent->request($Request); |
82 my $Response = $Agent->request($Request); |
83 |
83 |
84 #catch errors / failure |
84 #catch errors / failure |
85 if(! $Response->is_success){ |
85 if(! $Response->is_success){ |
86 print "HTTP-Error: " . $Response->message . "\n"; |
86 print "HTTP-Error: " . $Response->message . "\n"; |
87 exit(-1); |
87 exit(-1); |
88 } elsif (exists($Options{'w'})) { |
88 } elsif (exists($Options{'w'})) { |
89 print $Response->content; |
89 print $Response->content; |
90 exit (0); |
90 exit (0); |
91 } elsif ($Response->content =~ /NO SOLUTION OUTPUT BY SYSTEM/){ |
91 } elsif ($Response->content =~ /NO SOLUTION OUTPUT BY SYSTEM/){ |
92 if ($Response->content =~ /%\s*Result\s*:(.*)\n%\s*Output\s*:(.*)\n%/) { |
92 print "No Solution Output by System\n"; |
93 print "No Solution Output\nResult: $1\nOutput: $2\n"; |
|
94 } else { |
|
95 print "No Solution Output\n"; |
|
96 } |
|
97 exit(-1); |
93 exit(-1); |
98 } elsif ($Response->content =~ /ERROR: Could not form TPTP format derivation/) { |
94 } elsif ($Response->content =~ /ERROR: Could not form TPTP format derivation/) { |
99 print "Could not form TPTP format derivation\n"; |
95 print "Could not form TPTP format derivation\n"; |
100 exit(-1); |
96 exit(-1); |
101 } elsif ($Response->content =~ /WARNING: (\S*) does not exist/) { |
97 } elsif ($Response->content =~ /WARNING: (\S*) does not exist/) { |