The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

VCS::LibCVS::Client::Request - a request in the CVS client protocol

SYNOPSIS

  my $mode = VCS::LibCVS::Datum::Mode->new("u=rw,g=rw,o=r");
  my $mod_request = VCS::LibCVS::Client::Request::Modified->
                              new( [ "afile" , $mode, "/tmp/afile" ] );
  $client->submit_request($mod_request);

DESCRIPTION

This is a generic superclass for all of the various requests in the cvsclient protocol. A request includes zero or more pieces of data (LibCVS::Datum), which are specified when the request is constructed. A request is submitted to the server through a Client, which may return some responses. You should instantiate subclasses of this class, not this class itself.

The protocol defines which requests will elicit responses, so you can ask a request if it expects a response. A given server may not support all requests, the Client can queried to find out which ones are supported. Requests other than those must not be submitted to the server.

CLASS ROUTINES

new()

$request = Client::Request::SubClass->new($args_data)

Only call this on subclasses of Client::Request. Some subclasses override this constructor.

return type: Client::Request::SubClass
argument 1 type: (optional) array ref

A ref to an array which contains the data for constructing the required Datum's of the Client::Request. If the Client::Request has no required Datum's, you may omit the argument (pass undef).

To determine the required data check the Request's documentation, or call the Request's required_data() routine.

Constructs and returns a new request.

required_data()

@request_required_data = $request->required_data()

return type: list of names of subclasses of Datum

A list of strings which are subpackages of Datum, like ("String", "DirectoryName", "TagSpec").

The list of data which are required in this request. Each of the named classes are subpackages of "VCS::LibCVS::Datum". This list is used in the construction of the request, whose parameters must match the names in this list.

INSTANCE ROUTINES

protocol_print()

$request->protocol_print($file_handle)

return type: undef
argument 1 type: IO::Handle

Prints the Request to the IO::Handle. The output will be formatted for sending to the cvs server, including the placement of newlines.

as_protocol_string()

$request_string = $request->as_protocol_string()

return type: string scalar

Returns the Client::Request as a string suitable for being sent to the server, including the placement of newlines.

response_expected()

$response_expected = $request->response_expected()

return type: boolean scalar

Indicates if the request expects to elicit a response when submitted to the server.

name()

$name = $request->name()

return type: string scalar

Returns the protocol name of the request.

SEE ALSO

  VCS::LibCVS::Datum
  VCS::LibCVS::Client
  VCS::LibCVS::Client::Request::Requests
  VCS::LibCVS::Client::Request::Argument
  VCS::LibCVS::Client::Request::ArgumentUsingRequests