man VCP::Plugin () - A base class for VCP::Source and VCP::Dest

NAME

VCP::Plugin - A base class for VCP::Source and VCP::Dest

SYNOPSIS

   use VCP::Plugin;
   @ISA = qw( VCP::Plugin );
   ...

DESCRIPTION

Some functionality is common to sources and destinations, such as cache access, help text generation , command-line access shortcut member, etc.

EXTERNAL METHODS

new
Creates an instance, see subclasses for options. The options passed are usually native command-line options for the underlying repository's client. These are usually parsed and, perhaps, checked for validity by calling the underlying command line.
plugin_documentation
   $text = $p->plugin_documentation;
Returns the text of the DESCRIPTION section of a module's .pm as contained in VCP::Help. The DESCRIPTION returned is determined by CW$self.

SUBCLASSING

This class uses the fields pragma, so you'll need to use base and possibly fields in any subclasses.

SUBCLASS API

These methods are intended to support subclasses.

init
This is called after new() and before processing. No attempt to connect to or open a repository or database file should be made until init() is called (ie not in new()).
usage_and_exit
   GetOptions( ... ) or $self->usage_and_exit ;
Used by subclasses to die if unknown options are passed in.
tmp_dir
Returns the temporary directory this plugin should use, usually something like /tmp/vcp123/dest-p4.
queue_END_sub
In order to provide ordered destruction and cleanup at application shutdown, plugins can queue up code to run before all directories are deleted.
mkdir
   $self->mkdir( $filename ) ;
   $self->mkdir( $filename, $mode ) ;
Makes a directory and any necessary parent directories. The default mode is 770. Does some debug logging if any directories are created. Returns nothing.
mkpdir
   $self->mkpdir( $filename ) ;
   $self->mkpdir( $filename, $mode ) ;
Makes the parent directory of a filename and all directories down to it. The default mode is 770. Does some debug logging if any directories are created. Returns the path of the parent directory.

COPYRIGHT

Copyright 2000, Perforce Software, Inc. All Rights Reserved.

This module and the VCP package are licensed according to the terms given in the file LICENSE accompanying this distribution, a copy of which is included in vcp.

AUTHOR

Barrie Slaymaker <barries@slaysys.com>