I wanted to make sure a changed library mod was included, so I bumped the version.
My mod:
package tlib;
our $VERSION='0.0.3';
The prog:
#!/usr/bin/perl
use warnings; use strict;
use tlib '0.0.4';
I get no error. I vaguely remember that I was told that as long as the version strings were of the same format -- like a quoted literal, or a 'v' string, they'd compare correctly (I thought).
In fact, the problem seems to lie in the 'use-ing' prog. The version check
works whether the module has quotes (or not), but the version check is ignored if
the 'using' prog has a version in quotes in the same format as in the module.
Why doesn't this work? I.e. if a prog that is using a module uses the same version format as is used in the module, why doesn't compare happen correctly?
Does anyone think it would be worth asking for a "enhancement" on version checks to allow a quoted version string to work the same as if it was unquoted (or if it is in the same format used in the module)?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.