Skip to main content
Published: January 18 2008, 5:59:00 PMUpdated: August 08 2022, 12:15:55 AM

Provides guidance on how to run the Perl sampleson Windows.

Summary

Perl samples on how to access the eBay Trading API through are available.

As you attempt to run the samples on a Windows environment, you may encounter several issues.  This discusses how to address those issues.

Detailed Description


Installing XML/DOM package


As you run the samples in a default Perl installation, you may find you need to install the XML/DOM package :


C:\> perl GeteBayOfficialTime.pl 

Can't locate XML/DOM.pm in @INC (@INC contains: C:/Perl/lib, C:/Perl/site/lib .) 
at GeteBayOfficialTime.pl line 9. 
BEGIN failed--compilation aborted at GeteBayOfficialTime.pl  line 9. 

You will need to run the Perl Package Manager (ppm) to install this package.

C:\> ppm install XML-DOM 

====================
Install 'XML-RegExp' version 0.03 in ActivePerl 5.8.8.817.
====================
Installing C:\Perl\html\site\lib\XML\RegExp.html
Installing C:\Perl\site\lib\XML\RegExp.pm
Successfully installed XML-RegExp version 0.03 in ActivePerl 5.8.8.817.
====================
Install 'libxml-perl' version 0.08 in ActivePerl 5.8.8.817.
====================
Installing C:\Perl\html\site\lib\Data\Grove.html
Installing C:\Perl\html\site\lib\Data\Grove\Parent.html
...
Installing C:\Perl\site\lib\XML\PatAct\ToObjects.pm
Successfully installed libxml-perl version 0.08 in ActivePerl 5.8.8.817. 
====================
Install 'XML-DOM' version 1.44 in ActivePerl 5.8.8.817.
====================
Installing C:\Perl\html\site\lib\XML\DOM.html
Installing C:\Perl\html\site\lib\XML\DOM\AttDef.html
...
Installing C:\Perl\site\lib\XML\DOM\XMLDecl.pod
Installing C:\Perl\site\lib\XML\Handler\BuildDOM.pm
Successfully installed XML-DOM version 1.44 in ActivePerl 5.8.8.817. 

Install Crypt/SSLeay

To enable https Trading API calls you will need to have the Crypt/SSLeay package Again, use the Perl Package Manager (ppm) as needed.
C:\ > GeteBayOfficialTime.pl 
    
501 Protocol scheme 'https' is not supported (Crypt::SSLeay not installed) C:\ >ppm PPM - Programmer's Package Manager version 3.4. Copyright (c) 2001 ActiveState Software Inc.
Entering interactive shell. Using Term::ReadLine::Perl as readline library.
Type 'help' to get started.

ppm> install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd 
====================
Install 'Crypt-SSLeay' version 0.53 in ActivePerl 5.8.8.817.
====================
Downloaded 80320 bytes.
Extracting 37/37: blib
Installing C:\Perl\site\lib\auto\Crypt\SSLeay\SSLeay.bs
Installing C:\Perl\site\lib\auto\Crypt\SSLeay\SSLeay.dll
Installing C:\Perl\site\lib\auto\Crypt\SSLeay\SSLeay.exp
Installing C:\Perl\site\lib\auto\Crypt\SSLeay\SSLeay.lib
Installing C:\Perl\site\lib\auto\Crypt\SSLeay\SSLeay.pdb
Installing C:\Perl\html\site\lib\Crypt\SSLeay.html
Files found in blib\arch: installing files in blib\lib into architecture dependent library tree
Installing C:\Perl\site\lib\Crypt\SSLeay.pm
Installing C:\Perl\site\lib\Crypt\SSLeay\Conn.pm
Installing C:\Perl\site\lib\Crypt\SSLeay\CTX.pm
Installing C:\Perl\site\lib\Crypt\SSLeay\Err.pm
Installing C:\Perl\site\lib\Crypt\SSLeay\MainContext.pm
Installing C:\Perl\site\lib\Crypt\SSLeay\X509.pm
Installing C:\Perl\site\lib\Net\SSL.pm
**************************************************************************
This software package uses strong cryptography, so even if it is created,     
    
    
    
    
    
maintained and distributed from countries where it is legal to do this,
it falls under certain export/import and/or use restrictions in some
other parts of the world.
PLEASE REMEMBER THAT EXPORT/IMPORT AND/OR USE OF STRONG CRYPTOGRAPHY
SOFTWARE, PROVIDING CRYPTOGRAPHY HOOKS OR EVEN JUST COMMUNICATING
TECHNICAL DETAILS ABOUT CRYPTOGRAPHY SOFTWARE IS ILLEGAL IN SOME PARTS
OF THE WORLD. SO, WHEN YOU IMPORT THIS PACKAGE TO YOUR COUNTRY,
RE-DISTRIBUTE IT FROM THERE OR EVEN JUST EMAIL TECHNICAL SUGGESTIONS OR
EVEN SOURCE PATCHES TO THE AUTHOR OR OTHER PEOPLE YOU ARE STRONGLY
ADVISED TO PAY CLOSE ATTENTION TO ANY EXPORT/IMPORT AND/OR USE LAWS
WHICH APPLY TO YOU. THE AUTHORS OF OPENSSL ARE NOT LIABLE FOR ANY
VIOLATIONS YOU MAKE HERE. SO BE CAREFUL, IT IS YOUR RESPONSIBILITY.
CREDIT INFORMATION: This product includes cryptographic software
written by Eric A. Young (eay@cryptsoft.com). This product includes
software written by Tim J. Hudson (tjh@cryptsoft.com).
**************************************************************************
Proceed with installation? [yes] yes 
A copy of the needed library ssleay32.dll was found in
C:\Programs\php\ssleay32.dll. If this is compatible with the version (0.9.8a) 
used to compile the Perl module, all that is needed to
complete the installation is to ensure
C:\Programs\php\ssleay32.dll is in your PATH environment variable. 
Aborting download of ssleay32.dll.
Successfully installed Crypt-SSLeay version 0.53 in ActivePerl 5.8.8.817. 
ppm>exit 


 

Run the sample

C:\> perl GeteBayOfficialTime.pl 
Content-Type: text/html; charset=ISO-8859-1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"&nbsp; "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<title>GeteBayOfficialTime</title>
<meta content="text/html; charset=iso-8859-1" />
</head>
<body>
<p><B>Current eBay Time is 2008-01-25T20:20:19.150Z GMT</B></p>
</body>
</html>
    
 

How well did this answer your question?
Answers others found helpful

Got thoughts? Click the feedback button – your insights help us improve!