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

Tails 1.1.1 is out

The next Tails release is scheduled for October 14. Have a look to our roadmap to see where we are heading to. Read more

Healthdirect Australia sees value in open source for security solution

Commonwealth and state/territory government funded public company, Healthdirect Australia, has used open source software to build an identity and access management (IAM) solution. The IAM solution allows users to have one identity across all of its websites and applications. For example, users can sign in using their Facebook, LinkedIn or Gmail account. Read more

Ubuntu Installer Bug Can Delete Your Hard Drive and All Other OSes

The Ubuntu installation procedure is governed by a piece of software called Ubiquity and it's one of the most intuitive and easy-to-use installers on the Linux platform. Unfortunately, users have been confronting with a bug that could wipe their entire hard-driver without any kind of announcement. Read more

You have your Windows in my Linux

Although there are those who think the systemd debate has been decided in favor of systemd, the exceedingly loud protests on message boards, forums, and the posts I wrote over the past two weeks would indicate otherwise. I've seen many declarations of victory for systemd, now that Red Hat has forced it into the enterprise with the release of RHEL 7. I don't think it's that easy. Read more