http://www.perlmonks.org?node_id=1031611


in reply to Re^6: Developing code to be a module (perl -lanse)
in thread Developing code to be a module

The item of code you have quoted is what is known as an example; if it were used in a professional environment you would write a unit test for it. Unit tests have a purpose; if someone comes along to improve the code, then they can verify that their changes do not screw it up in any way.

If you spot any bugs in my solutions, it's because I've deliberately left them in as an exercise for the reader! :-)
  • Comment on Re^7: Developing code to be a module (perl -lanse)

Replies are listed 'Best First'.
Re^8: Developing code to be a module (professionalism)
by Anonymous Monk on May 02, 2013 at 04:06 UTC

    The item of code you have quoted is what is known as an example;

    Sure its not; yeah, its in the example directory, but it does a real job , and does it well, and comes with documentation; it is a real useful program

    if it were used in a professional environment you would write a unit test for it...

    Maybe it is being used in "a real professional environment"? Maybe different environments have different standards? Maybe, there is a threshold, for when to turn stuff into modules, when to write unit tests?