Skip Menu |
 

This queue is for tickets about the HTTP-Server-Simple CPAN distribution.

Report information
The Basics
Id: 38345
Status: resolved
Priority: 0/
Queue: HTTP-Server-Simple

People
Owner: Nobody in particular
Requestors: perl [...] galumph.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Attachments
0001-Add-use-HTTP-Server-Simple-Version-RT-38345.patch



Subject: HTTP::Server::Simple::CGI has $VERSION that isn't independently eval-able.
Date: Fri, 08 Aug 2008 18:38:12 -0500
To: bug-HTTP-Server-Simple [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Download (untitled) / with headers
text/plain 597b
The $VERSION assignment in HTTP::Server::Simple::CGI looks like: $VERSION = $HTTP::Server::Simple::VERSION; This won't work with tools like CPANPLUS that eval these lines in isolation, i.e. neither HTTP/Server/Simple.pm nor HTTP/Server/Simple/CGI.pm will have actually been loaded. The $VERSION line gets extracted in isolation and thus CPANPLUS thinks that $HTTP::Server::Simple::CGI::VERSION is 0. This problem is causing a failed test report for CPAN::Mini::Webserver to be sent as NA instead of FAIL because CPANPLUS thinks that CPAN::Mini::Webserver's prereqs haven't been installed.
Patch attached. It might solve the issue while not repeating versions everywhere.
From d66fd469f9d8b4ccdccd3386f364fc29d1a9802c Mon Sep 17 00:00:00 2001 From: Brad Bowman <bugs@bereft.net> Date: Wed, 9 Sep 2009 20:15:48 +1000 Subject: [PATCH] Add & use HTTP::Server::Simple::Version, RT#38345 One-line evalable $VERSION, in a style stolen from SVK. The VERSION lines match /([\$*])(([\w\:\']*)\bVERSION)\b.*\=/ and hopefully resolve the issues in the RT ticket. perl -Ilib -le 'eval q"use HTTP::Server::Simple::Version; $VERSION = $HTTP::Server::Simple::VERSION;"; print $VERSION || $@' 0.40 --- lib/HTTP/Server/Simple.pm | 2 +- lib/HTTP/Server/Simple/CGI.pm | 2 +- lib/HTTP/Server/Simple/CGI/Environment.pm | 2 +- lib/HTTP/Server/Simple/Version.pm | 9 +++++++++ 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 lib/HTTP/Server/Simple/Version.pm diff --git a/lib/HTTP/Server/Simple.pm b/lib/HTTP/Server/Simple.pm index eeac7a5..a28f5fe 100644 --- a/lib/HTTP/Server/Simple.pm +++ b/lib/HTTP/Server/Simple.pm @@ -8,7 +8,7 @@ use Carp; use URI::Escape; use vars qw($VERSION $bad_request_doc); -$VERSION = '0.40'; +use HTTP::Server::Simple::Version; $VERSION = $HTTP::Server::Simple::VERSION; =head1 NAME diff --git a/lib/HTTP/Server/Simple/CGI.pm b/lib/HTTP/Server/Simple/CGI.pm index a3e6fc6..e0cbe3f 100644 --- a/lib/HTTP/Server/Simple/CGI.pm +++ b/lib/HTTP/Server/Simple/CGI.pm @@ -8,7 +8,7 @@ use warnings; use CGI (); use vars qw($VERSION $default_doc); -$VERSION = $HTTP::Server::Simple::VERSION; +use HTTP::Server::Simple::Version; $VERSION = $HTTP::Server::Simple::VERSION; =head1 NAME diff --git a/lib/HTTP/Server/Simple/CGI/Environment.pm b/lib/HTTP/Server/Simple/CGI/Environment.pm index 8a05c3f..77137cb 100644 --- a/lib/HTTP/Server/Simple/CGI/Environment.pm +++ b/lib/HTTP/Server/Simple/CGI/Environment.pm @@ -6,7 +6,7 @@ use warnings; use HTTP::Server::Simple; use vars qw($VERSION %ENV_MAPPING); -$VERSION = $HTTP::Server::Simple::VERSION; +use HTTP::Server::Simple::Version; $VERSION = $HTTP::Server::Simple::VERSION; my %clean_env = %ENV; diff --git a/lib/HTTP/Server/Simple/Version.pm b/lib/HTTP/Server/Simple/Version.pm new file mode 100644 index 0000000..a9866cb --- /dev/null +++ b/lib/HTTP/Server/Simple/Version.pm @@ -0,0 +1,9 @@ +use strict; +use warnings; + +package HTTP::Server::Simple; + +use vars qw($VERSION); +$VERSION = '0.40'; + +$VERSION; # instead of "1;" -- 1.6.0.4
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #38345] HTTP::Server::Simple::CGI has $VERSION that isn't independently eval-able.
Date: Wed, 9 Sep 2009 07:26:50 -0400
To: Brad Bowman via RT <bug-HTTP-Server-Simple [...] rt.cpan.org>
From: jesse <jesse [...] fsck.com>
Download (untitled) / with headers
text/plain 673b
On Wed, Sep 09, 2009 at 06:21:23AM -0400, Brad Bowman via RT wrote: Show quoted text
> Queue: HTTP-Server-Simple > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=38345 > > > Patch attached. It might solve the issue while not > repeating versions everywhere.
Show quoted text
> From d66fd469f9d8b4ccdccd3386f364fc29d1a9802c Mon Sep 17 00:00:00 2001 > From: Brad Bowman <bugs@bereft.net> > Date: Wed, 9 Sep 2009 20:15:48 +1000 > Subject: [PATCH] Add & use HTTP::Server::Simple::Version, RT#38345 > > One-line evalable $VERSION, in a style stolen from SVK.
I'm not really a fan of this sort of thing. It's a lot of complexity to work around what I see as an annoying flaw in CPANPLUS.
Subject: Re: [rt.cpan.org #38345] HTTP::Server::Simple::CGI has $VERSION that isn't independently eval-able.
Date: Wed, 09 Sep 2009 08:07:54 -0500
To: bug-HTTP-Server-Simple [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Download (untitled) / with headers
text/plain 239b
Jesse via RT wrote: Show quoted text
> I'm not really a fan of this sort of thing. It's a lot of complexity to > work around what I see as an annoying flaw in CPANPLUS.
I beg to differ. How much effort does it to plainly declare the version of a module?
Subject: Re: [rt.cpan.org #38345] HTTP::Server::Simple::CGI has $VERSION that isn't independently eval-able.
Date: Wed, 9 Sep 2009 09:23:49 -0400
To: Elliot Shank via RT <bug-HTTP-Server-Simple [...] rt.cpan.org>
From: Jesse Vincent <jesse [...] fsck.com>
Download (untitled) / with headers
text/plain 474b
On Wed 9.Sep'09 at 9:08:18 -0400, Elliot Shank via RT wrote: Show quoted text
> Queue: HTTP-Server-Simple > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=38345 > > > Jesse via RT wrote:
> > I'm not really a fan of this sort of thing. It's a lot of complexity to > > work around what I see as an annoying flaw in CPANPLUS.
> > I beg to differ. How much effort does it to plainly declare the version of a module?
$VERSION = '0.40'; is pretty plain and clear, no?
Subject: Re: [rt.cpan.org #38345] HTTP::Server::Simple::CGI has $VERSION that isn't independently eval-able.
Date: Wed, 09 Sep 2009 23:14:26 -0500
To: bug-HTTP-Server-Simple [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Download (untitled) / with headers
text/plain 455b
Jesse via RT wrote: Show quoted text
> On Wed 9.Sep'09 at 9:08:18 -0400, Elliot Shank via RT wrote:
>> Jesse via RT wrote:
>>> I'm not really a fan of this sort of thing. It's a lot of complexity to >>> work around what I see as an annoying flaw in CPANPLUS.
>> I beg to differ. How much effort does it to plainly declare the version of a module?
> > > $VERSION = '0.40'; > > is pretty plain and clear, no?
But "$VERSION = $HTTP::Server::Simple::VERSION;" is not.
Subject: Re: [rt.cpan.org #38345] HTTP::Server::Simple::CGI has $VERSION that isn't independently eval-able.
Date: Thu, 10 Sep 2009 02:06:08 -0400
To: Elliot Shank via RT <bug-HTTP-Server-Simple [...] rt.cpan.org>
From: Jesse Vincent <jesse [...] fsck.com>
Download (untitled) / with headers
text/plain 177b
Show quoted text
> But "$VERSION = $HTTP::Server::Simple::VERSION;" is not.
Understood. Would it be wrong to remove the version number from the submodules and then tell CPAN to reindex them?
Download (untitled) / with headers
text/plain 870b
On Thu Sep 10 02:06:17 2009, jesse@fsck.com wrote: Show quoted text
> >
> > But "$VERSION = $HTTP::Server::Simple::VERSION;" is not.
> > Understood. Would it be wrong to remove the version number from the > submodules and then tell CPAN to reindex them?
(Wow, replying to 5 year old ticket) I had this problem when indexing modules locally with Parse::PMFile (for Carton). Since PAUSE already had an issue with this VERSION line and index them as "undef", you can simply remove the VERSION line. $ grep HTTP::Server::Simple::CGI ~/.cpanm/sources/http%www.cpan.org/02packages.details.txt HTTP::Server::Simple::CGI undef J/JE/JESSE/HTTP-Server-Simple-0.44.tar.gz HTTP::Server::Simple::CGI::Environment undef J/JE/JESSE/HTTP-Server-Simple-0.44.tar.gz Of course you could add its own $VERSION line with the real value, and let release management tool to auto-bump them.
Subject: Re: [rt.cpan.org #38345] HTTP::Server::Simple::CGI has $VERSION that isn't independently eval-able.
Date: Wed, 14 Jan 2015 20:01:44 -0500
To: Tatsuhiko Miyagawa via RT <bug-HTTP-Server-Simple [...] rt.cpan.org>
From: Kevin Falcone <cpan [...] jibsheet.com>
Download (untitled) / with headers
text/plain 902b
On Wed, Jan 14, 2015 at 06:45:32PM -0500, Tatsuhiko Miyagawa via RT wrote: Show quoted text
> I had this problem when indexing modules locally with Parse::PMFile (for Carton). Since PAUSE already had an issue with this VERSION line and index them as "undef", you can simply remove the VERSION line. > > $ grep HTTP::Server::Simple::CGI ~/.cpanm/sources/http%www.cpan.org/02packages.details.txt > HTTP::Server::Simple::CGI undef J/JE/JESSE/HTTP-Server-Simple-0.44.tar.gz > HTTP::Server::Simple::CGI::Environment undef J/JE/JESSE/HTTP-Server-Simple-0.44.tar.gz > > Of course you could add its own $VERSION line with the real value, and let release management tool to auto-bump them.
Those modules don't actually need a VERSION, so I've just removed them (and fixed ::Environment to read $HTTP::Server::Simple::VERSION directly) and shipped 0.45_03. I'll push a real version number in a few days. -kevin
Download (untitled) / with headers
text/plain 1015b
On Wed Jan 14 20:02:09 2015, FALCONE wrote: Show quoted text
> On Wed, Jan 14, 2015 at 06:45:32PM -0500, Tatsuhiko Miyagawa via RT > wrote:
> > I had this problem when indexing modules locally with Parse::PMFile > > (for Carton). Since PAUSE already had an issue with this VERSION line > > and index them as "undef", you can simply remove the VERSION line. > > > > $ grep HTTP::Server::Simple::CGI > > ~/.cpanm/sources/http%www.cpan.org/02packages.details.txt > > HTTP::Server::Simple::CGI undef J/JE/JESSE/HTTP-Server- > > Simple-0.44.tar.gz > > HTTP::Server::Simple::CGI::Environment undef J/JE/JESSE/HTTP-Server- > > Simple-0.44.tar.gz > > > > Of course you could add its own $VERSION line with the real value, > > and let release management tool to auto-bump them.
> > Those modules don't actually need a VERSION, so I've just removed them > (and fixed ::Environment to read $HTTP::Server::Simple::VERSION > directly) and shipped 0.45_03. I'll push a real version number in a > few days.
Resolved in 0.50 -kevin


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.