SVK::Command - Base class for SVK commands
use SVK::Command; # invoking commands SVK::Command->invoke ($xd, $cmd, $output, @arg);
Use SVK::Command->invoke. The arguments in order are the SVK::XD object, the command name, the output scalar ref, and the arguments for the command. The command name is translated with the %alias map.
SVK::Command->invoke
%alias
SVK::Command->invoke loads the corresponding class SVK::Command::$name, so that's the class you want to implement the following methods in:
SVK::Command::$name
Returns a hash where the keys are Getopt::Long specs and the values are a string that will be the keys storing the parsed option in $self.
$self
Given the array of command arguments, use arg_* methods to return a more meaningful array of arguments.
arg_*
Use the lock_* methods to lock the SVK::XD object. The arguments will be what is returned from parse_arg.
lock_*
parse_arg
Actually process the command. The arguments will be what is returned from parse_arg.
Returned undef on success. Return a string message to notify the caller errors.
Argument is a name of depot. such as '' or 'test' that is being used normally between two slashes.
Argument is a plain path in the filesystem.
Argument is a checkout path.
Argument is a depotpath, including the slashes and depot name.
Argument might be a checkout path or a depotpath.
Argument is a number of checkout paths.
All the methods except arg_depotname returns a SVK::Target object, which is a hash with the following keys:
arg_depotname
The hashes are handy to pass to many other functions.
lock
Display an one-line brief usage of the command. Optionally a file could be given to extract the usage from the pod.
Display usage. An optional argument is to display detail or not.
SVK, SVK::XD, SVK::Command::*
SVK::Command::*
Chia-liang Kao <clkao@clkao.org>
Copyright 2003-2004 by Chia-liang Kao <clkao@clkao.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
To install SVK, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SVK
CPAN shell
perl -MCPAN -e shell install SVK
For more information on module installation, please visit the detailed CPAN module installation guide.