sciurius / perl-Text-Layout

Pango style markup formatting for PDF::API2, Markdown, Cairo and more
2 stars 2 forks source link

VERSION flaw #5

Closed PhilterPaper closed 4 years ago

PhilterPaper commented 4 years ago

In Layout.pm, and possibly all the other modules, please hard code $VERSION to a numeric string, e.g.,

our $VERSION = '0.014';

This is so the CPAN system can recognize the current version number, and not report it as "undef" and complain that I'm downgrading.

In PDF::Builder, I leave it as

# VERSION
my $LAST_UPDATE = '3.018'; # manually update whenever code is changed

and my Perl script build process replaces the first line by

our $VERSION = '3.018';  # VERSION

when preparing the build package to send to CPAN.

I haven't had a chance yet to play with the new features (if they require Pango and HarfBuzz, I'm stuck).

sciurius commented 4 years ago

The PAUSE indexer tells me:

Status: Successfully indexed
============================
 module : Text::Layout
 version: 0.014
 in file: lib/Text/Layout.pm
 status : indexed

MetaCPAN reports it as 0.014.

cpanm upgrades flawlessly:

 % cpanm Text::Layout
 --> Working on Text::Layout
Fetching http://www.cpan.org/authors/id/J/JV/JV/Text-Layout-0.014.tar.gz ... OK
Configuring Text-Layout-0.014 ... OK
Building and testing Text-Layout-0.014 ... OK
Successfully installed Text-Layout-0.014 (upgraded from 0.013)
1 distribution installed

I do not know what I would have done wrong...

PhilterPaper commented 4 years ago

Maybe it's something with the 'cpan' system on Windows that it doesn't like $VERSION set to some module value rather than a string. Since cpan is the recommended way of updating (at least for Strawberry Perl), I think you would want to stay compatible with this (least common denominator?) method. Or is everyone on Windows now using cpanm or something, and we can forget cpan?

sciurius commented 4 years ago

I'd say that if it's only the cpan tool on Windows you probably should address the cpan tool maintainers.

PhilterPaper commented 4 years ago

See RT 131568 (on cpan.org). I think it's the same issue, and the OP provides more information about the innards of the distribution system.