<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; From: Fred Moyer &lt;fred@redhotpenguin.com&gt;</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; To: Greg Lindahl &lt;greg@blekko.com&gt;</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; Cc: sanfrancisco-pm@pm.org</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; Sent: Fri, March 4, 2011 12:33:32 PM</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; Subject: Re: [sf-perl] Dumb Q's about CPAN submission</font></div><div><font class="Apple-style-span" face="'times new roman', 'new
 york', times, serif">&gt;&nbsp;</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; On Fri, Mar 4, 2011 at 11:51 AM, Greg Lindahl &lt;greg@blekko.com&gt; wrote:</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; &gt; I'm trying to submit my first CPAN modules and I have some dumb</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; &gt; questions that I haven't found answers for.</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; &gt;</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; &gt; 2) I have dependencies with YAML and Test::More -- the one other</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; &gt; system I tried had an older version
 of Test::More which doesn't</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; &gt; grok 'done_testing()'.</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; &gt;</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; &gt; How do I figure out which versions to ask for? Or should I just avoid</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; &gt; done_testing() in cpan modules, so as to tolerate older versions?</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt;&nbsp;</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; With regards to running the tests based on the version of Test::More</font></div><div><font class="Apple-style-span" face="'times
 new roman', 'new york', times, serif">&gt; (if I'm understanding your question correctly), I usually use</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; something like this in the Makefile.PL to see if the needed version of</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; Test::More is installed. &nbsp;If it isn't, the tests don't run.</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt;&nbsp;</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; package MY;</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt;&nbsp;</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; sub test {</font></div><div><font class="Apple-style-span" face="'times new
 roman', 'new york', times, serif">&gt; &nbsp; &nbsp; my $self = shift;</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt;&nbsp;</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; &nbsp; &nbsp; eval { require Test::More } or return &lt;&lt;EOF;</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; test::</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; \t\@echo sorry, cannot run tests without Test::More</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; EOF</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt;&nbsp;</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; &nbsp; &nbsp; unless
 ($Test::More::VERSION &gt; '0.123') {</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; &nbsp; &nbsp; &nbsp; &nbsp; return &lt;&lt;EOF;</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; test::</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; \t\@echo sorry, need at least version 0.124 of Test::More</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; EOF</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt;&nbsp;</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; &nbsp; &nbsp; return $self-&gt;SUPER::test(@_);</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; }</font></div><div><font
 class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; _______________________________________________</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; SanFrancisco-pm mailing list</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; SanFrancisco-pm@pm.org</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><span>&gt; <a target="_blank" href="http://mail.pm.org/mailman/listinfo/sanfrancisco-pm">http://mail.pm.org/mailman/listinfo/sanfrancisco-pm</a></span></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; I'm trying to submit my first CPAN modules and I have some dumb</font></div><div><font class="Apple-style-span"
 face="'times new roman', 'new york', times, serif">&gt; questions that I haven't found answers for.</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><span>I'm sure you saw this, <a target="_blank" href="http://www.cpan.org/modules/04pause.html">http://www.cpan.org/modules/04pause.html</a></span></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt;1) I think the process should be:</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt;</font></div><div><font class="Apple-style-span" face="'times new
 roman', 'new york', times, serif">&gt;* submit a test version (how do I indicate that? $VERSION = '1.00_1' ?)</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt;* cpan smokers send me emails showing breakage</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt;* fix bugs, rinse repeat, when done, use $VERSION = '1.00' to release</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; Correct?</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">Yes, more or less.&nbsp;</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york',
 times, serif"><br></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">Here is an interesting read on versioning in perl,</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><span><a target="_blank" href="http://www.dagolden.com/index.php/369/version-numbers-should-be-boring/">http://www.dagolden.com/index.php/369/version-numbers-should-be-boring/</a></span></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; 2) I have dependencies with YAML and Test::More -- the one other</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; system I tried had an older version of Test::More which doesn't</font></div><div><font class="Apple-style-span" face="'times new
 roman', 'new york', times, serif">&gt; grok 'done_testing()'.</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt;&nbsp;</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; How do I figure out which versions to ask for? Or should I just avoid</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">&gt; done_testing() in cpan modules, so as to tolerate older versions?</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">Well, you should require a version with appropriate functionality.</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div><font class="Apple-style-span" face="'times new roman', 'new
 york', times, serif">If you want to support older versions, don't use newer features.</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">(or you can implement 'fallback to' on missing methods)</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">As for specifying specific versions, I like using MakeMaker.</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><span><a target="_blank" href="http://search.cpan.org/~mschwern/ExtUtils-MakeMaker-6.56/lib/ExtUtils/MakeMaker.pm#Using_Attributes_and_Parameters">http://search.cpan.org/~mschwern/ExtUtils-MakeMaker-6.56/lib/ExtUtils/MakeMaker.pm#Using_Attributes_and_Parameters</a></span></font></div><div><span class="Apple-style-span" style="font-family: 'times new roman',
 'new york', times, serif; ">see PREREQ_PM</span></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; color: black; "><br></div></div><div style="position: fixed; color: black; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "></div>


</div></body></html>