Sample code for 30+ languages & platforms
Perl

Transition from Cert.GetValidToDt to Cert.ValidToStr

Provides instructions for replacing deprecated GetValidToDt method calls with ValidToStr.

Chilkat Perl Downloads

Perl
use chilkat();

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

# ------------------------------------------------------------------------
# The GetValidToDt method is deprecated:

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

# ...
# ...

# ------------------------------------------------------------------------
# Do the equivalent using the ValidToStr property

$ckdt2 = chilkat::CkDateTime->new();
$ckdt2->SetFromRfc822($cert->validToStr());