Skip to content

Commit

Permalink
2020.1 release code drop.
Browse files Browse the repository at this point in the history
  • Loading branch information
ppiorunski committed Sep 21, 2020
1 parent 23293b4 commit 3e2252b
Show file tree
Hide file tree
Showing 12 changed files with 292 additions and 294 deletions.
38 changes: 22 additions & 16 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
Copyright (c) 2001-2017, Perforce Software, Inc. All rights reserved.
Copyright (c) Perforce Software, Inc., 1997-2020. All rights reserved

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
1 Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL PERFORCE SOFTWARE, INC. BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PERFORCE
SOFTWARE, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
21 changes: 14 additions & 7 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use File::Copy;
use English;

# --- Supported API version ---------------------------------------------------
our $TARGET_API_VERSION = "2019.1";
our $TARGET_API_VERSION = "2020.1";

# --- GLOBALS -----------------------------------------------------------------
our $ssl_path = undef; ## SSL path string
Expand Down Expand Up @@ -107,7 +107,7 @@ sub p4perl_version {
# Read API version file
my $ver = new Version("Version");
die("Aborting: Cannot read local p4-perl Version file!") unless $ver;

# logging...
print( " building p4perl version: \t" . $ver->toPatch() . "\n" );
return $ver;
Expand Down Expand Up @@ -206,12 +206,12 @@ sub check_api_version {
my $t = $target->getRelease();

return 1 if ( $v == $t );

my $string = $ver->toString();
print <<EOF;
This version of P4Perl was designed for use with the $TARGET_API_VERSION
release of the Perforce C++ API. Using it with other releases may not work,
release of the Perforce C++ API. Using it with other releases may not work,
and is not supported. ($string)
EOF
Expand Down Expand Up @@ -289,6 +289,13 @@ sub add_p4_libs( $$$$ ) {
push( @libs, "ssleay32" );
}

# [MSWIN32] and NOT MinGW
elsif ( $os eq "MSWIN32" ) {
push( @libs, "ssl" );
push( @libs, "crypto" );
push( @libs, "crypt32" );
}

# [LINUX]
elsif ( $os eq "LINUX" ) {
push( @libs, "rt" );
Expand Down Expand Up @@ -349,7 +356,7 @@ sub get_platform {
#
my $os = $Config{'osname'};
my @fields = split( /-/, $Config{'archname'} );

print( " with archname: \t\t" . $Config{'archname'} . "\n");

my $plat;
Expand All @@ -370,7 +377,7 @@ sub get_platform {
}

print(" using os: \t\t\t$os\n");
print(" using platform: \t\t$plat\n");
print(" using platform: \t\t$plat\n");
return $plat;
}

Expand Down Expand Up @@ -426,7 +433,7 @@ sub get_osver {

# -----------------------------------------------------------------------------
# Function: config_sub
# Description: Called by WriteMakefile - adds the Perforce API path to the
# Description: Called by WriteMakefile - adds the Perforce API path to the
# header includes and libs
# -----------------------------------------------------------------------------
sub config_sub {
Expand Down
11 changes: 8 additions & 3 deletions P4.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1071,9 +1071,14 @@ sub AUTOLOAD {
$comment .= $l . "\n";
}
}
my $spec = $self->ParseSpec( $1, $form );
$spec->{'comment'} = $comment;
return $spec;
my $spec = $self->ParseSpec( $1, $form );
# If there is a problem with processing the spec, we will
# get undefined returned, need to catch it before we add comments.
unless (defined $spec){
die("Invalid specification");
}
$spec->{'comment'} = $comment;
return $spec;
}
elsif ( $cmd =~ /^format(\w+)/i ) {
die("Format$1 requires an argument!") if ( !scalar(@_) );
Expand Down
2 changes: 1 addition & 1 deletion P4.xs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "perlheaders.h"

// Undef conflicting macros defined by Perl
#undef Error
Expand All @@ -32,6 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#undef Copy

#include "clientapi.h"
#include "perlheaders.h"
#include "strtable.h"
#include "debug.h"
#include "p4perldebug.h"
Expand Down
13 changes: 6 additions & 7 deletions P4/IterateSpec.pm
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ P4::IterateSpec
=head1 SYNOPSIS
use P4;
my $p4 = P4->new;
$p4->Connect or die "Couldn't connect";
my $i = $p4->IterateClients();
while($i->hasNext) {
my $spec = $i->next;
Expand All @@ -59,7 +59,7 @@ P4::IterateSpec
=head1 DESCRIPTION
P4::IterateSpec is a class for iterating over Perforce specs.
It's intended to be used on one spec type, returning an
It's intended to be used on one spec type, returning an
iterable object with next() and hasNext() methods.
Arguments can be passed to the iterator to filter the results,
Expand All @@ -71,7 +71,7 @@ or like the Run("cmd") option the spec type can be passed as an
argument, for example:
$p4->Iterate( "changes" );
=head1 METHODS
=cut
Expand All @@ -88,7 +88,6 @@ sub new {
$self->{list} = $p4->Run( $type, @_ );
$self->{type} = $type;

print("type: " . $type . "\n");
return $self;
}

Expand Down Expand Up @@ -136,8 +135,8 @@ sub next {
=over
Returns true (1) if there are specs left in the iterator;
otherwise false if empty.
Returns true (1) if there are specs left in the iterator;
otherwise false if empty.
=back
Expand Down
40 changes: 13 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,53 @@
[![Support](https://img.shields.io/badge/Support-Official-green.svg)](mailto:[email protected])

# p4perl
# P4Perl
## Overview
P4Perl is a wrapper for the P4 C++ API in Perl.

P4Perl is a Perl module that provides an object-oriented API to Helix Core server. Using P4Perl is faster than using the command-line interface in scripts, because multiple command can be executed on a single connection, and because it returns Helix server responses as Perl hashes and arrays.

## Requirements
#### Helix Core Compatibility
P4Perl 2019.1 officially supports Helix Core Server 2019.1.
P4Perl 2020.1 officially supports Helix Core Server 2020.1.

#### API Compatibility
The 2019.1 release of P4Perl supports the 2019.1 Helix Core API (P4API). Older releases of the Helix Core API may work but are no longer supported.
The 2020.1 release of P4Perl supports the 2020.1 Helix Core API (P4API). Older releases of the Helix Core API may work but are no longer supported.

#### Perl Compatibility
The 2019.1 release of P4Perl is supported building from source with Perl 5.28 and versions back to 5.14.
The P4Perl 32-bit Windows installer requires Perl 5.28 32-bit.
The P4Perl 64-bit Windows installer requires Perl 5.28 64-bit.
The 2020.1 release of P4Perl is supported building from source with Perl 5.28 and versions back to 5.14.
The P4Perl 32-bit Windows installer requires Perl 5.32 32-bit.
The P4Perl 64-bit Windows installer requires Perl 5.32 64-bit.

#### OpenSSL Compatibility
To build P4Perl with encrypted communication support, you must use the version of OpenSSL that Perforce C/C++ API has been built against. Running P4Perl linked to an older library will fail with the error:

"SSL library must be at least version 1.0.1."

The 2016.1 release of P4Perl is supported with OpenSSL 1.0.1.

For detailed compatibility, please check the following table:
"SSL library must be at least version 1.0.1."

##### Perforce C/C++ API Version | OpenSSL Release
============================================
2012.1 | 1.0.0
2012.2 - 2014.2 | 1.0.1g+
2016.1 | 1.0.1k+
2018.2 | 1.0.2
2019.1 | 1.0.2
The 2020.1 release of P4Perl is supported with OpenSSL 1.0.2 and 1.1.1.

#### Platform Compatibility

While P4Perl is generally portable, this release is certified only on the following platforms:

* Linux kernel 2.6+ (glibc 2.12+) for Intel(x86, x86_64)
* Windows 8 for Intel(x86, x64)
* Windows 8.1 for Intel(x86, x64)
* Windows 10 for Intel(x86, x64)
* Windows 2008 for Intel(x86, x64)
* Windows 2012 for Intel(x64)
* Windows 2016 for Intel(x64)
* Apple OS X 10.10+ for Intel(x86_64)
* Windows 2019 for Intel(x64)

#### Compiler Compatibility

To build P4Perl from source, you must use a version of Perl that has been compiled with the same compiler used to build the Perforce C++ API. For most platforms, use gcc/g++.

Attempting to use a different compiler or a different version of the compiler can cause linker errors due to differences in name handling between compilers.
Attempting to use a different compiler or a different version of the compiler can cause linker errors due to differences in name handling between compilers.

#### Compatibility with Previous Releases

P4Perl 2019.1 is backwards-compatible with all previous releases from Perforce Software.
P4Perl 2020.1 is backwards-compatible with all previous releases from Perforce Software.

## Documentation
Official documentation is located on the [Perforce website](https://www.perforce.com/manuals/p4perl/Content/P4Perl/Home-p4perl.html)

## Support
P4Perl is officially supported by Perforce.
Pull requests will be managed by Perforce's engineering teams. We will do our best to acknowledge these in a timely manner based on available capacity.
Issues will not be managed on GitHub. All issues should be recorded via [Perforce's standard support process](https://www.perforce.com/support/request-support).
Issues will not be managed on GitHub. All issues should be recorded via [Perforce's standard support process](https://www.perforce.com/support/request-support).
Loading

0 comments on commit 3e2252b

Please sign in to comment.