

The DCOM files and installation instructions are available from the Microsoft’s Web site at Installing the Perl/Tk Modules with Perl Package ManagerĪctiveState extended the standard CPAN modules (Comprehensive Perl Archive, which we will discuss shortly) with its own Perl Package Manager (PPM). For Windows95, however, you need to make sure that you have DCOM installed (it’s already installed on Win98 and NT machines).
ACTIVESTATE PERL INSTALL
To install the latest version of Perl for Win32, go to the ActiveState download page ( For Windows 98 and Windows NT, there are no special instructions download the latest version (APi517e.exe as of this writing), and run the self-installer by double clicking on the file.

You should then be well on your way to being an expert pTk programmer! Installing ActiveState Perl for Win32 I’ll then do a brief walk through the code, showing examples of various widget (object) use within the system. Then we’ll look at what it takes to make a pTk program: program flow, geometry management, event and variable bindings, and the event loop. If you are using Linux, this will mean compiling the libraries as well, though that is not at all difficult. For now, you can find more information by typing perldoc perldoc from the command line– once Perl is installed, of course! I’ll remind you of this a couple of times.įirst, we’ll need to install both Perl and the Tk libraries. Whenever you get stuck, chances are the answer to your questions will be right on your local computer. Perl comes with some of the best documentation available in the form of POD (plain old documentation) files, and a search/viewing program called perldoc. We will cover a lot of ground very quickly in this article, and of necessity, will gloss over quite a few very important points. You can see it running under both Windows 95 (Figure 1) and Linux (Figure 2).
ACTIVESTATE PERL CODE
Of course, the code works with any pTk system. Real transactions can be implemented quite easily I’ll show you how at the end of the article. The example system uses a simulated credit-card authorization module that does nothing except verify that the transaction could be a valid one.
ACTIVESTATE PERL SOFTWARE
For many merchants, it is less expensive (and faster) to use the Internet to process their credit card (or check) transactions than to purchase additional software or terminals. So I created a pTk Point-of-Sale (POS) terminal program to do so. I decided that it would be great to have a system that could do all my credit-card processing from my local PC, for testing as well as for real e-commerce. One project I’ve worked on recently is integrating the PaymentNet credit-card processing client software into various applications. So when I decided to write this article, I naturally looked around to see what might be useful to others using the pTk system. My expertise lies in electronic commerce. This system is geared toward the Win32 and Linux developers however, most of the information presented pertains to other operating systems as well. In this article, I will introduce the basics of installing the Perl interpreter for Win32 and writing a visual application using the Tk (toolkit) modules.
ACTIVESTATE PERL PORTABLE
An important advantage of using the pTk (Perl/Tk) combination is that you can write truly portable cross-platform GUI applications– applications that will work similarly across Win32, Macintosh, Linux, and even the AS/400! What many people don’t realize, however, is that Perl is a powerful general purpose programming language that can be used to do general-purpose development– including cross-platform GUI development with the Tk tool kit originally developed for the Tcl programming language under Unix.

Perl’s author, Larry Wall, has a much more colorful name for the language: the “Pathologically Eclectic Rubbage Lister.” Many people are aware of Perl’s role in the Web, specifically as an easy-to-use text processing language for writing CGI scripts. Perl is officially known as the “Practical Extraction and Report Language,” in part because of its extremely robust text handling abilities. “This article originally appeared in Visual Developer Magazine”
