Calling custom Perl module issue
Hello,
I have created new Perl Module. In that, I have created subfunction to load details of certificates.
When i am calling the module and subfunction to my view file, it throws an error as below
"Failed to load module "CertificateDetails": "
Module code :
View file code :
Can anyone guide me what's wrong on this, please? Thanks in advance!
sub load_certificate_details {
my ( $args, $result ) = @_;
my @certdetails;
my $cert_data = Crypt::OpenSSL::X509->new_from_file('cert.pem');
push @certdetails, $cert_data->issuer();
push @certdetails, $cert_data->email();
$result->data( \@certdetails );
return 1;
}
View file code :
$certficate_details = $cpanel->uapi(
'CertificateDetails', 'load_certificate_details'
);
Can anyone guide me what's wrong on this, please? Thanks in advance!
-
Hi, Where do you have the CertificateDetails.pm file? 0 -
Hi, Where do you have the CertificateDetails.pm file?
I have placed my pm files in "/usr/local/cpanel/Cpanel/API/" Thanks Rajkumar S0
Please sign in to leave a comment.
Comments
4 comments