<a href="http://search.cpan.org/dist/Test-Inline/" target="_blank">http://search.cpan.org/dist/Test-Inline/</a><br><br>[hello from Atlanta ;)]<br><br><div class="gmail_quote">On Fri, Mar 18, 2011 at 4:56 PM, djgoku <span dir="ltr"><<a href="mailto:djgoku@gmail.com">djgoku@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">So I am in the process of writing a perl script and I don't really<br>
want to have multiple files, one for the actually script and another<br>
for testing. So I have written all my tests in the same file using<br>
Test::More. The perl script uses a command line switch (-t) to enable<br>
running tests then exits Has anyone ever done this before? Is there a<br>
better way less using multiple files?<br>
<br>
if($test) {<br>
   # run tests and exit<br>
} else {<br>
   main();<br>
}<br>
<br>
Jonathan<br>
_______________________________________________<br>
kc mailing list<br>
<a href="mailto:kc@pm.org">kc@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/kc" target="_blank">http://mail.pm.org/mailman/listinfo/kc</a><br>
</blockquote></div><br>