sub PUT{ my ( $self , $req , $resp ) = @_; .. Do put something in this resource .. .. Fill resp if necessary .. .. Return the appropriate http code if( $somethingWentWrong ){ return Apache2::Const::HTTP_BAD_REQUEST ; } # else it's ok return Apache2::Const::HTTP_OK ; }