You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Sidney Markowitz <si...@sidney.com> on 2005/06/19 21:46:12 UTC

Error message building with dev version of Net::DNS

I filed a bug report for Net::DNS regarding their use of version numbers
like 0.51_01 for development versions, suggesting that they use 0.5101 or
similar to avoid breaking code like ours that checks for minimum version
with a "use Net::DNS versionnumber;" statement.

The reply I got was positive, but is looking for a solution to how to signal
to CPAN that it is a development version so that it is not automatically
picked up by people who are following dependencies in an install from CPAN.

I guess we don't have that problem because we don't use CPAN as our
development repository.

Does anyone here know how they can keep dev versions from automatically
downloading while still not causing the error message in the SpamAssassin
build? Or is the answer that we just accept that there is a warning message
when using a dev build of Net::DNS?

 -- sidney

Re: Error message building with dev version of Net::DNS

Posted by Sidney Markowitz <si...@sidney.com>.
Theo Van Dinter wrote:
> It sounds like whenever we check for version, we should do something like:
>
> 	$version =~ s/_\d.*$//;

The problem with that is the check for version number is built in to the use
or require statement

use modulename minimumversion;

It seems unaesthetic to me to change that to something a lot more
complicated everywhere we have a minimum version check. I would rather just
document somewhere that using a development version of a module can result
in a "non-numeric" error message that can be ignored. It does make it
obvious that a dev version of a module is being used.

 -- sidney



Re: Error message building with dev version of Net::DNS

Posted by Sidney Markowitz <si...@sidney.com>.
Malte S. Stretz wrote:
> Judging from the current perldata
> man page and version doc of Perl 5.9 I think the Net::DNS guys should have
> used a numeric value with an underscore instead of a string

I'll pass on that suggestion as something he can check with the CPAN people.
He is open to fixing it if there is a way.

 -- sidney

Re: Error message building with dev version of Net::DNS

Posted by "Malte S. Stretz" <ms...@gmx.net>.
On Tuesday 21 June 2005 01:30 CET Loren Wilton wrote:
> > It sounds like whenever we check for version, we should do something
> > like:
> >
> >  $version =~ s/_\d.*$//;
>
> Why not s/_/\./ instead? Or if you wantr to treat it as a float, just
> drop the underscore or replace it with a zero?  

The correct way would actually be a tr/_//d, see perldata.  We could also 
use the string operators like gt lt etc.  Judging from the current perldata 
man page and version doc of Perl 5.9 I think the Net::DNS guys should have 
used a numeric value with an underscore instead of a string because in 
numbers underscores are silently dropped by the interpreter while probably 
CPAN keeps them as it doesn't use the Perl parser to find the $VERSION but 
a simple RegEx.  I think :)

> Either of those would 
> preserve the fact that you have a fractionally higher version number, and
> would get past the 'not numeric' complaints.  Essentially convert that
> format into your internal version number format.

Seems like we can't actually fix the problem as it comes a level higher from 
the Perl use routine.  We could of course create our own use routine or 
fiddle around directly with the $Net::DNS::VERSION variable but I don't 
think thats its worth it.

Cheers,
Malte

-- 
[SGT] Simon G. Tatham: "How to Report Bugs Effectively"
      <http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>
[ESR] Eric S. Raymond: "How To Ask Questions The Smart Way"
      <http://www.catb.org/~esr/faqs/smart-questions.html>

Re: Error message building with dev version of Net::DNS

Posted by Loren Wilton <lw...@earthlink.net>.
> It sounds like whenever we check for version, we should do something like:

>  $version =~ s/_\d.*$//;

Why not s/_/\./ instead? Or if you wantr to treat it as a float, just drop
the underscore or replace it with a zero?  Either of those would preserve
the fact that you have a fractionally higher version number, and would get
past the 'not numeric' complaints.  Essentially convert that format into
your internal version number format.


Re: Error message building with dev version of Net::DNS

Posted by Theo Van Dinter <fe...@apache.org>.
On Mon, Jun 20, 2005 at 03:59:58PM +1200, Sidney Markowitz wrote:
> So the developer of Net::DNS is supposed to give it a version number like
> 0.51_01 when he uploads it to CPAN for people to test with. I think we just
> have to accept that if everyone follows conventions, our perl Makefile.PL
> will emit an error message when used with an unreleased development version
> of NET::DNS. Since the build doesn't break, I guess that's ok.

It sounds like whenever we check for version, we should do something like:

	$version =~ s/_\d.*$//;

-- 
Randomly Generated Tagline:
I couldn't care less about apathy.

Re: Error message building with dev version of Net::DNS

Posted by Sidney Markowitz <si...@sidney.com>.
I found the following in a page of instructions for CPAN submitters at
  http://www.cpan.org/modules/04pause.html#conventions

"The automatic integration of your work into several indexes and directory
trees is not always what you desire. If you want to prevent propagation to
places outside of your directory, simply choose a filename that matches
/\d\.\d+_\d/. PAUSE will leave such distributions alone: no readme will be
extracted, no index will be updated, no symlinks will be created."

So the developer of Net::DNS is supposed to give it a version number like
0.51_01 when he uploads it to CPAN for people to test with. I think we just
have to accept that if everyone follows conventions, our perl Makefile.PL
will emit an error message when used with an unreleased development version
of NET::DNS. Since the build doesn't break, I guess that's ok.

 -- sidney