Language Selection

English French German Italian Portuguese Spanish

Writing Perl test cases

Filed under
HowTos

If you've ever automated any operations with Perl you'll most likely have written a small script or two, and then left them to run. But how do you know that your code is correct? The answer is to write some test cases and verify they perform correctly. With Perls test facilities this is a simple thing to do.

Most large Perl projects have a test suite, and so do many of the common modules you'll have installed.

To get started we'll look at a simple example. Suppose your script uses some non-standard Perl modules that suggests the very first test you write should verify that those are available. That way if you attempt to run the program upon a new host you'll immediately know whether you need to install these non-standard modules.

Full Article.

More in Tux Machines

Today in Techrights

Linux and Graphics

today's howtos

Ubuntu 16.04.2 LTS Delayed Until February 2, Will Bring Linux 4.8, Newer Mesa

If you've been waiting to upgrade your Ubuntu 16.04 LTS (Xenial Xerus) operating system to the 16.04.2 point release, which should have hit the streets a couple of days ago, you'll have to wait until February 2. We hate to give you guys bad news, but Canonical's engineers are still working hard these days to port all the goodies from the Ubuntu 16.10 (Yakkety Yak) repositories to Ubuntu 16.04 LTS, which is a long-term supported version, until 2019. These include the Linux 4.8 kernel packages and an updated graphics stack based on a newer X.Org Server version and Mesa 3D Graphics Library. Read more