Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI-Compile CPAN distribution.

Report information
The Basics
Id: 95403
Status: new
Priority: 0/
Queue: CGI-Compile

People
Owner: Nobody in particular
Requestors: OPI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: return code of the generated sub is inconsistent
If the generated function returns without exception, that means the original CGI program simply ends after the last line of code without calling exit explicitly, the return value of the script is returned from the wrapping sub. For normal scripts that would be the exit code. However, if the script calls C<exit> explicitly, the wrapping sub dies if the exit code passed this way is other than 0. The generated code should read return $rv unless $@; die $@ if $@ and not ( ref($@) eq 'ARRAY' and $@->[0] eq "EXIT\n" ); return $@->[1]; instead of return $rv unless $@; die $@ if $@ and not ( ref($@) eq 'ARRAY' and $@->[0] eq "EXIT\n" ); die "exited nonzero: $@->[1]" if $@->[1] != 0; return $rv;