feature request - error code ( not string ) in perl glue
Jonathan Vanasco <[email protected]>
| Newsgroups | gmane.comp.apache.apreq |
|---|---|
| Message-ID | <[email protected]> |
Currently , on error, the following return string error messages: $req->args_status() $req->body_status() $req->param_status() i'd like to suggest the following change: a: new module Apache2::Request::Constants operates in the same manner as Apache2::Const b: an optional parameter returns a tuple/list of ( $string_error , $const_code ) without the parameter, the current functionality remains , so its fully backwards compatible. $req->args_status(1) $req->body_status(1) $req->param_status(1) or $req->args_status(list=>1) $req->body_status(list=>1) $req->param_status(list=>1) why? matching string errors is really ugly to replace this: my $error= $apr->body_status(); if ( $error eq 'Exceeds configured maximum limit' ) with something like this: my ($code,$error)= $apr->body_status(1); if ( $code == APR::Const::EXCEEDED_MAXIMUM )