VCS::LibCVS::Command.3pm

Langue: en

Autres versions - même langue

Version: 2005-10-10 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

VCS::LibCVS::Command - A command to send to the server.

SYNOPSIS

DESCRIPTION

VCS::LibCVS::Command represents a single command sent to the server, and provides access to the response.

It is for internal LibCVS use only.

CLASS ROUTINES

new()

$command = VCS::LibCVS::Command->new($opts, $command, $opts, $files_and_dirs)
return type: VCS::LibCVS::Command
Newly created command class.
argument 1 type: ref to hash of options
No options currently supported.
argument 2 type: scalar string
The CVS command to call, such as ``update'', ``ci'', etc. Strictly, it is the name of one of the subclasses of VCS::LibCVS::Client::Request::ArgumentUsingRequest.
argument 3 type: ref to list of scalar strings
Options to pass to the CVS server, such as ``-r1.1'', ``-kb''. These are pretty much the same as the options passed on the cvs command line.
argument 4 type: ref to list of files and directories
The files and directories to process for the command. They are objects of any of these types:
  VCS::LibCVS::RepositoryFile
  VCS::LibCVS::RepositoryDirectory
  VCS::LibCVS::WorkingFile
  VCS::LibCVS::WorkingDirectory
  VCS::LibCVS::FileRevision

Creates a new Command. You must then issue the command on a repository.

INSTANCE ROUTINES

issue()

$command->issue($repo)
return type: undef
argument 1 type: VCS::LibCVS::Repository
The repository upon which the command is issued.

Issues the command on the repository. In case of error an exception is thrown.

To get the reponses, use get_responses() or get_messages().

get_responses()

@responses = $command->get_responses($type)
return type: list of VCS::LibCVS::Client::Response
argument 1 type: scalar type string
The type of responses requested.

Returns the responses of the specified type. If the type is undef or the empty string, all responses are returned.

get_messages()

@messages = $command->get_messages($pattern)
return type: list of scalar strings
argument 1 type: scalar string or Regexp
Optional Regexp that returned messages match.

Goes through all the M reponses and returns the contents of those which match the provided regexp.

get_errors()

@messages = $command->get_errors($pattern)
return type: list of scalar strings
argument 1 type: scalar string or Regexp
Optional Regexp that returned errors match.

Goes through all the E reponses and returns the contents of those which match the provided regexp.

get_files()

@files = $command->get_files()
return type: list of VCS::LibCVS::Client::Response

Goes through all the reponses and returns those which are file transmissions. They are responses of type ``Checked-in'', ``Merged'', ``Updated'', . . .

SEE ALSO

   VCS::LibCVS