Step 1: install X500::DN.

Step 2: test it

$ perl
use X500::DN;
Parse::RecDescent version 1.8 required--this is only version 1.95.1  at 
/usr/local/lib/perl5/site_perl/5.8.8/X500/DN.pm line 10.
BEGIN failed--compilation aborted at 
/usr/local/lib/perl5/site_perl/5.8.8/X500/DN.pm line 10.
Compilation failed in require at - line 1.
BEGIN failed--compilation aborted at - line 1.

Step 3: step through the looking-glass into the world of version.pm

Changing X500/DN.pm line 10 from:
  use Parse::RecDescent 1.80;
to:
  use Parse::RecDescent '1.80';

made this problem go away.  Looking at Parse/RecDescent.pm shows:
  use version; $VERSION = qv('1.95.1');

"perldoc version" is uninformative and appears to contradict the fix of
quoting the version.  So, time to test.

$ perl -Mversion -le \
    'print "newer\n" if version->new("1.95.1") > version->new("1.80")'
$

No output?  But I quoted both?

$ perl -Mversion -le '$i=version->new(1.95.1);$w=version->new(1.80);
    print "okay" if $i >= $w; print "too old" if $i < $w'
too old
$ perl -Mversion -le '$i=version->new("1.95.1");$w=version->new("1.80");
    print "okay" if $i >= $w; print "too old" if $i < $w'
too old
$ perl -Mversion -le '$i=version->new("v1.95.1");$w=version->new("1.80");
    print "okay" if $i >= $w; print "too old" if $i < $w'
too old

WTF?  Quoting _doesn't_ help here?

$ perl -Mversion -le 'print version->new("1.95.1")'
1.95.1
$ perl -Mversion -le 'print version->new(1.95.1)'  
v1.95.1

*sobs*

$ perl -Mversion -le 'print qv(1.95.1)'
v1.95.1
$ perl -Mversion -le 'print qv("1.95.1")'
1.95.1

Oh, foolish Parse::RecDescent, how could it have been so silly as to
quote the value passed to the qv() function, since clearly it's designed
to work as a quoting operator, even though it has to use parens since it
really is a function.

$ perl -Mversion -le 'print version->new(1.80)'
1.8
$ perl -Mversion -le 'print version->new("1.80")'
1.80

By this point, clearly I need to look for a "dump this in something
other than default format" operator.  Ah, ->normal().

$ perl -Mversion -e '$i=version->new("v1.95.1");$w=version->new(1.80);
    print "okay\n" if $i >= $w; print "too old\n" if $i < $w;
    print "Installed: ",$i->normal,"\nWant: ",$w->normal,"\n"'   
too old
Installed: v1.95.1
Want: v1.800.0

So 1.8, 1.80, '1.80', etc (I tested more than shown here) all actually
reult in v1.800.0 which explains why 1.95.1 doesn't satisfy a minimum of
1.80.

$ perl -Mversion -e '$i=version->new("v1.95.1");$w=version->new("v1.80");
    print "okay\n" if $i >= $w; print "too old\n" if $i < $w;
    print "Installed: ",$i->normal,"\nWant: ",$w->normal,"\n"'
okay
Installed: v1.95.1
Want: v1.80.0

Aaarggh!!

And yet, for import purposes, it was sufficient to quote the number as
'1.80' instead of needing the v prefix.  Look closer, see how the
VERSION method is being overriden in the importing class ... strange,
it's not in @EXPORT and version->import isn't setting it in the calling
namespace... okay, it's XS code to look at, time to unpack the source;
okay, a pure-perl version and an XS version?  For speed??  And what's
this ... *GRRAARARAAAGGH*  It's overriding UNIVERSAL::VERSION ??

So pulling in version.pm in any module pollutes the version dependency
checking of any other module?  Why?  What sort of supreme arrogance
leads someone to think that their way of doing this is so much better
than the default that it should be used even by those who haven't
requested it, depending only upon the order in which a program might
have done its imports?

I so wish Larry Wall were still involved in perl5 to reign this crap in.

This is the final straw.  I was writing in Perl on my own time, since it
wasn't Python and I found it comfortable.  A few niggles here and there
when trying to deal with x509 objects but I mostly worked around them.
But this?  No.  Perl since 5.8 has been moving away from being the
comfortable environment I like.  It was bad enough when the p5p folks
decided that switching to lazy garbage collection was a safe change to
make in a point release and so broke my lock objects, where
object-existence-means-you-hold-the-lock and I had to add a bunch of
eval BLOCK stuff to coerce DESTROY invocations.  But Perl really is not
being properly maintained when this festering dung seeps so deeply into
common modules without being reigned in.

I've had enough.  This personal project is getting rewritten in Python.
At least Python is honest about which part of its worldview it will
force on you.  At least I can use threads in Python without needing to
maintain two parallel interpreter installs, each with all modules
installed, so that I still have a non-threaded version around for all
the software which depends upon that.

I _liked_ Perl's approach of wrapping all the clean theory up with a
gooey context-sensitive DWIM layer to let the human learn it as
something approaching a human language and just write it.  I don't like
Python's coercive worldview.  But Python has never betrayed me, the way
that Perl is betraying me, more and more, as Larry Wall has less and
less to do with it.

-Phil

Reply via email to