Sample code for 30+ languages & platforms
Perl

Transition from Cert.GetCertChain to Cert.BuildCertChain

Provides instructions for replacing deprecated GetCertChain method calls with BuildCertChain.

Chilkat Perl Downloads

Perl
use chilkat();

$success = 0;

$cert = chilkat::CkCert->new();

# ------------------------------------------------------------------------
# The GetCertChain method is deprecated:

# certchainObj is a CertChain
$certchainObj = $cert->GetCertChain();
if ($cert->get_LastMethodSuccess() == 0) {
    print $cert->lastErrorText() . "\r\n";
    exit;
}

# ...
# ...

# ------------------------------------------------------------------------
# Do the equivalent using BuildCertChain.
# Your application creates a new, empty CertChain object which is passed 
# in the last argument and filled upon success.

$certchainOut = chilkat::CkCertChain->new();
$success = $cert->BuildCertChain($certchainOut);
if ($success == 0) {
    print $cert->lastErrorText() . "\r\n";
    exit;
}