Thanks for the input.
I was working on the "modulino" approach first, before I start separating things out into modules. I have a few Perl scripts that I'd like to re-write in a more verifiable fashion, so I am jumping around the testing tools and docs to see what I can get done first.
I'd also like to help out more, particularly in the PDL modules, but I have to learn a lot more about the testing tools before I could be useful to anyone.
My questions regarding return values:
1. How are return values propagated throughout the call chain? Ie. If I indirectly call my reduce sub through a number of other functions (in this case, I have the root main sub, an add sub and finally the reduce sub that calculates the final answer and exits. What should each of those subroutines return to make testing consistent?
2. How do you deploy scripts written in the modular style you advocate? I assume the *.pm files are called by a top level *.pl file that acts like the file that holds the main function in a C program, if that makes sense. Ie. I write myscript.pl that imports subs and structures from any number of *.pm files. The user invokes myscript.pl and has no need to worry about any of the *.pm files if they are installed correctly.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|