The P4 module consists of several public classes:
The following tables provide brief details about each public class.
The main class used for executing Helix Core commands. Almost everything you do with P4Perl will involve this class.
Method | Description |
---|---|
Construct a new |
|
Print build information including P4Perl version and Helix C/C++ API version. |
|
Clear the output handler. |
|
Initialize the Helix Core client and connect to the Server. |
|
Disconnect from the Helix Versioning Engine. |
|
Returns the number of errors encountered during execution of the last command. |
|
Returns a list of the error strings received during execution of the last command. |
|
Shorthand for running:
$p4->Run( "<spectype>", "-o" );
|
|
Shorthand for running:
$p4->FormatSpec( "<spectype>", hash );
|
|
Converts a Helix server form of the specified type (client/label etc.) held in the supplied hash into its string representation. |
|
Get current API compatibility level. |
|
Get character set when connecting to Unicode servers. |
|
Get current client workspace ( |
|
Get current working directory. |
|
Get the value of a
Helix Core
environment variable, taking into account |
|
Get the output handler. |
|
Get the current hostname. |
|
Get |
|
Get |
|
Get |
|
Get the current password or ticket. |
|
Get host and port ( |
|
Get the program name as shown by the |
|
Get the progress indicator. |
|
Get the location of the |
|
Get the current username ( |
|
Get the version of your script, as reported to the Helix Versioning Engine. |
|
Test whether or not session has been connected and/or has been dropped. |
|
Test whether or not streams are enabled. |
|
Test whether or not tagged output is enabled. |
|
Test whether or not server performance tracking is enabled. |
|
Iterate through spec results. |
|
Return an array of |
|
Get the location of the configuration file used
( |
|
Shorthand for running: $p4-ParseSpec( "<spectype>", buffer ); |
|
Converts a
Helix server
form of the specified type ( |
|
Shorthand for running:
$p4-Run( "cmd", arg, ... );
|
|
Run a
Helix Core
command and return its results. Check for errors with
|
|
Runs a |
|
Runs |
|
A thin wrapper for changing your password. |
|
Interface to |
|
Submit a changelist to the server. |
|
Get a list of tickets from the local tickets file. |
|
Shorthand for running:
$p4->SetInput( $spectype );
$p4->Run( "<spectype>", "-i" );
|
|
Returns an integer specifying whether or not the server is case-sensitive. |
|
Returns an integer specifying the server protocol level. |
|
Returns an integer specifying whether or not the server is in Unicode mode. |
|
Specify the API compatibility level to use for this script. |
|
Set character set when connecting to Unicode servers. |
|
Set current client workspace ( |
|
Set current working directory. |
|
On Windows or OS X, set an environment variable in the registry or user preferences. |
|
Set the output handler. |
|
Set the name of the current host ( |
|
Save the supplied argument as input to be supplied to a subsequent command. |
|
Set |
|
Set |
|
Set |
|
Set
Helix Core
password ( |
|
Set host and port ( |
|
Set the program name as shown by the |
|
Set the progress indicator. |
|
Enable or disable streams support. |
|
Set the location of the |
|
Activate or deactivate server performance tracking. By default, tracking is off (0). |
|
Set the
Helix Core
username ( |
|
Set the version of your script, as reported to the Helix Versioning Engine. |
|
Toggles tagged output (1 or 0). By default, tagged output is on (1). |
|
If performance tracking is enabled with |
|
Returns the number of warnings issued by the last command. |
|
Returns a list of the warning strings received during execution of the last command. |
Utility class allowing access to the attributes of a file in the depot.
Returned by P4::RunFilelog()
.
Method | Description |
---|---|
Name of the depot file to which this object refers. |
|
Returns an array of revision objects for the depot file. |
Utility class allowing access to the attributes of a revision of a file
in the depot. Returned by P4::RunFilelog()
.
Method | Description |
---|---|
Returns the action that created the revision. |
|
Returns the changelist number that gave rise to this revision of the file. |
|
Returns the name of the client from which this revision was submitted. |
|
Returns the name of the depot file to which this object refers. |
|
Returns the description of the change which created this revision. |
|
Returns the MD5 digest for this revision. |
|
Returns the size of this revision. |
|
Returns an array of |
|
Returns the number of this revision. |
|
Returns date/time this revision was created. |
|
Returns the Helix Core filetype of this revision. |
|
Returns the name of the user who created this revision. |
Utility class allowing access to the attributes of an integration record
for a revision of a file in the depot. Returned by
P4::RunFilelog()
.
Method | Description |
---|---|
Integration method (merge/branch/copy/ignored). |
|
Integrated file. |
|
Start revision. |
|
End revision. |
A class that allows users to create and work with Helix Core mappings without requiring a connection to the Helix Versioning Engine.
Method | Description |
---|---|
Construct a new Map object (class method). |
|
Joins two maps to create a third (class method). |
|
Empties a map. |
|
Returns the number of entries in a map. |
|
Tests whether or not a map object is empty. |
|
Inserts an entry into the map. |
|
Translate a string through a map. |
|
Tests whether a path is mapped. |
|
Returns a new mapping with the left and right sides reversed. |
|
Returns the left side as an array. |
|
Returns the right side as an array. |
|
Returns the map as an array. |
Class encapsulating the context of an individual merge during execution
of a p4 resolve
command. Passed to P4::RunResolve
.
Method | Description |
---|---|
Returns the name of "your" file in the merge. (file in workspace) |
|
Returns the name of "their" file in the merge. (file in the depot) |
|
Returns the name of "base" file in the merge. (file in the depot) |
|
Returns the path of "your" file in the merge. (file in workspace) |
|
Returns the path of "their" file in the merge. (temporary file
on workstation into which |
|
Returns the path of the base file in the merge. (temporary file
on workstation into which |
|
Returns the path to the merge result. (temporary file on workstation into which the automatic merge performed by the server has been loaded) |
|
Returns hint from server as to how user might best resolve merge. |
|
If the environment variable |
Class encapsulating the context of an individual error during execution
of
Helix Core
commands. Passed to P4::Messages()
.
Method | Description |
---|---|
Returns the severity class of the error. |
|
Returns the generic class of the error message. |
|
Returns the unique ID of the error message. |
|
Get the text of the error message. |
Handler class that provides access to streaming output from the server;
call P4::SetHandler()
with an implementation of P4::OutputHandler
to enable
callbacks:
Method | Description |
---|---|
Process binary data. |
|
Process tabular data. |
|
Process information or errors. |
|
Process tagged output. |
|
Process text data. |
Handler class that provides access to progress indicators from the
server; call P4::SetProgress()
with an implementation of P4::Progress
to enable
callbacks:
Method | Description |
---|---|
Initialize progress indicator as designated type. |
|
Total number of units (if known). |
|
Description and type of units to be used for progress reporting. |
|
If non-zero, user has requested a cancellation of the operation. |
|
If non-zero, operation has failed. |
Class for handling resolves in Helix Core.
Method | Description |
---|---|
Perform a resolve and return the resolve decision as a string. |
Utility class allowing access to the attributes of the fields in a Helix server form.
Method | Description |
---|---|
Return the value associated with the field named fieldname. |
|
Set the value associated with the field named fieldname. |
|
Lists the fields that are permitted for specs of this type. |