From: Francesco Di Lorenzo > This message is particularly referred to serious programmer > (with serious I mean the ones who do programming for work). > The question is this: > What role do Perl have in your work? In which particular > projects you use it? Do you use it for particular piece of > your softwares' source code or you use it as your main > programming language?
I use Perl as a utility language. There are three basic groups of applications where I find it very useful. 1. Emulating clusters of cash registers. We support various registers with both serial and TCP/IP interfaces. Most of them use simple structured messages for transactions and responses, so it is easy enough to write a Perl script that will open a connection, then send and receive messages over it. I can create an emulation that looks like dozens of registers are in use, when we only have one or two available. 2. Generating test data. I can easily create any number of randomized transaction records for the emulation scripts, and for other uses. CSV files, or other structured data can be created in any quantity. These files are then passed to import functions for various applications. The files can be saved to be rerun as regression tests, or discarded and regenerated on demand. Last year we grabbed a copy of the first and last name files from the US Census Bureau. We often take random names from each to insert into a database for testing reports. 3. Selenium tests for web sites. I have been building a suite of functional tests using Perl with the Test Harness to run Selenium RC to test some of our web sites. Each script is initially written as a functional test, then added into the full suite which is evolving into a thorough regression test. Some of these scripts are also part of the Hudson build for one product. If those tests fail, the build fails. I have also been looking into using Perl with DBI/DBD to initialize and validate test databases for several products. The idea is to set up the necessary tables and insert the initial data. After the test sequence is run, verify the final state of the data. Bob McConnell -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/