How to Import a Perl Module

(reproduced from http://perldoc.perl.org/Exporter.html#How-to-Import)


In other files which wish to use your module there are three basic ways for them to load your module and import its symbols:
use YourModule;

This imports all the symbols from YourModule’s @EXPORT into the namespace of the use statement.
use YourModule ();

This causes perl to load your module but does not import any symbols.
use YourModule qw(…);

This imports only the symbols listed by the caller into their namespace. All listed symbols must be in your @EXPORT or @EXPORT_OK , else an error occurs. The advanced export features of Exporter are accessed like this, but with list entries that are syntactically distinct from symbol names.

Perl: undefined symbol: Perl_Gthr_key_ptr

Question:

I try to install the Chilkat Perl library into my Linux but I get this error:

“/usr/lib/perl5/site_perl/5.8.8/libchilkat.so: undefined symbol: Perl_Gthr_key_ptr”

Answer:

The Chilkat library is supports multi-threading, so when building Perl one must use the “Multi-Threading” option.

Chilkat v9.1.0 for Perl 5.8, 5.10 on Linux read for Beta Testing

Downloads

Perl 5.8, 64-bit: chilkat-9.1.0-Perl-5.8-x86_64-linux.tar.gz

Perl 5.8, 32-bit: chilkat-9.1.0-Perl-5.8-x86-linux.tar.gz

Perl 5.10, 64-bit: chilkat-9.1.0-Perl-5.10-x86_64-linux.tar.gz

Perl 5.10, 32-bit: chilkat-9.1.0-Perl-5.10-x86-linux.tar.gz

Install Instructions

A. Decompress and unpack to any directory.

gzip -dc chilkat-9.1.0-Perl-5.8-x86_64-linux.tar.gz | tar -xof -

B. BUILD

Go into the newly-created directory and type:

perl Makefile.PL
make
make test

C. INSTALL

While still in that directory, type:

make install

Make sure you have the appropriate permissions to install the module in your Perl 5 library directory. Often, you’ll need to be root.

Perl Date/Time Properties

Any date/time property in Chilkat’s Perl implementation is returned as a SYSTEMTIME object.

Here is sample code that demonstrates getting the ValidTo and ValidFrom property from a digital certificate:

	$sysTime0 = new chilkat::SYSTEMTIME();
	$cert->get_ValidFrom($sysTime0);
	
	$sysTime1 = new chilkat::SYSTEMTIME();
	$cert->get_ValidTo($sysTime1);
	
	print "Valid from " . $sysTime0->{wMonth} . "/" . 
		$sysTime0->{wDay} . "/" . $sysTime0->{wYear} . 
		" to " . $sysTime1->{wMonth} . "/" . $sysTime1->{wDay} . 
		 "/" . $sysTime1->{wYear};

The members of the SYSTEMTIME object are as follows:

// In C++ syntax:
struct SYSTEMTIME {
    unsigned short wYear;
    unsigned short  wMonth;
    unsigned short  wDayOfWeek;
    unsigned short  wDay;
    unsigned short  wHour;
    unsigned short  wMinute;
    unsigned short  wSecond;
    unsigned short  wMilliseconds;
};