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

What Your CIO Needs to Know About Open Source

Today’s businesses are becoming increasingly familiar with the many benefits of open source software. In fact, 74 percent of IT professionals, in the U.S. alone, agree that the software offers better quality of continuity and control than that of proprietary. However, some CIOs are still skeptical about adopting open source software into their IT infrastructure as they’ve grown accustomed to their proprietary software vendors. Read more

Elementary OS Freya 0.3 review

Elementary OS is a Linux desktop distribution that’s being primed as a “fast and open replacement for Windows and OS X.” It’s safe to say that that’s the goal of every Linux distribution. Some distributions have, to a large extent, succeeded, while some are partially or completely misguided. Elementary OS, even though it’s still just at version 0.3, belongs to the first group. Some of the design decisions make it slightly painful to use, but as a unit, the distribution is moving in the right direction. Will it ever get to the point where it replaces Windows and OS X for all users? No, because there’ll always be those that love Windows and Mac OS X no matter what. And there are still applications that have no real alternatives in Linux. Read more

Evolving KDE: Lehman’s Laws of Software Evolution In The Community

The board of KDE eV has launched a new initiative to ensure that KDE remains awesome and relevant for the foreseeable future. Unlike previous approaches it is not a point-in-time solution, it is a continuous process of improvement. And it is a good thing. Previously, I have written/spoken a lot about the role of Brooks’ Law in the context of Free Software. Brooks’ Law teaches us to be careful about the management of growth in our communities. Especially treated in consideration with the grossly under appreciated Conway’s Law. There are, of course, other laws of Software Engineering that apply to Free Software development. Read more