I don't think the way you have is too bad. What don't you like about it? It's only a few words in every module, and should never have to change. You're going to have to put
something in there to tell it to get the version from elsewhere, and what you've got is probably as good as anything.
Also, some of the cleverer tricks will confuse some of the programs that extract version numbers from your script (most importantly ExtUtils::MakeMaker). They look for a line assigning to $VERSION and execute that one line. In fact, to avoid confusing them, you probably want to put your use and your assignment on one line; something like:
use Bundle::VERSION; $VERSION=Bundle::VERSION::$VERSION;
Thinking about it a bit, this is a little shorter and seems to work:
our $VERSION=do 't24.version';
Then just put
t24.version somewhere in your
%INC path, with something like:
'1.6.80';
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.