Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

rjbs (4671)

  (email not shown publicly)
AOL IM: RicardoJBSignes (Add Buddy, Send Message)
Yahoo! ID: RicardoSignes (Add User, Send Message)

I'm a Perl coder living in Bethlehem, PA and working Philadelphia. I'm a philosopher and theologan by training, but I was shocked to learn upon my graduation that these skills don't have many associated careers. Now I write code.

Journal of rjbs (4671)

Monday September 26, 2005
12:26 PM

worst perl best practices

[ #26889 ]

There are a few things I disagree with in PBP, but I'm just going to name the one that is current causing me the most inconvenience because I can't just ignore the rule.

Damian says, "use three-part version numbers."

No. Do not do this, at least not if you're going to use

Because Damian is using "qv(0.99.2)" and the like, the CPAN indexer considers the version number in IO/ to be undef, so it is not newer than the one that had "$VERSION = '0.02'" and so the new version isn't installed when I run "cpanp install IO::Prompt"

Maybe the indexer should be fixed, but in the meantime, do not do what Damian does.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • You could always do what Class::DBI [] does:
    use version; $VERSION = qv('3.0.8');

    This is slightly ugly, but will work.


  • The 'old' CPAN indexer treated a version number like x.y.z as x.y, effectively chopping off the 'z'... so z and z+1 or for that matter z-1 all ended up as the same version in the indexes, and would be perpetually marked as 'up to date' until the minor version (y) got upped.

    Andreas is working on a change to the indexer that will use to translate x.y.z to a float that can be , but it's not there yet. Until then, I agree with the poster -- do not use x.y.z versions unless you *absolutely* must,