Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Generally, I like to run all my tests both in normal mode and taint mode. And the prove command's -T switch is very handy for that. By doing that, I can ensure that my module will work from a taint mode program.

Not only that, but verifying that your tests run the same both in normal mode and taint mode can uncover bugs in perl itself, since taint mode has historically been a source of perl bugs and weird differences in behaviour.

The trouble with -T is that "make test" runs the test in taint mode only. I wish there was some way to tell it to run a test twice: once in normal mode and once in taint mode.

To further ensure that your module works in still broader environments, it would be nice to test that it works fine in "persistent" environments, such as mod_perl (e.g. a module that uses an INIT block will not be mod_perl-safe). I don't know of an easy way to test that a module is "persistent-environment-safe".


In reply to Re: Why a taint flag on test files? by eyepopslikeamosquito
in thread Why a taint flag on test files? by xdg

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • 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.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-18 04:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found