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