[EMAIL PROTECTED] wrote:
> I'm very pleased to announce that tidyview is now available from CPAN.

Neat idea, but this is bad:

0 windhund /usr/local/src/CPAN/tidyview-1.09$ sudo make install
Password:
Installing /usr/local/lib/site_perl/VERSION.pm

Like it or not, we have to live with case-insensitive filesystems.  This does 
not actually blow over version.pm but only because tidyview is arch independent 
and version.pm is dependent so they go into different directories and 
arch-dependent modules (usually) come first in @INC.

And then there's the consideration of what happens when another application 
decides to ship their own VERSION.pm blowing over yours.

Call it TidyView::VERSION or something, keep it in your namespace.  It also 
means you can use version.pm without hacky work-arounds.

Patch attached.
diff -ru tidyview-1.09/MANIFEST tidyview-1.09.new/MANIFEST
--- tidyview-1.09/MANIFEST      2006-10-16 01:25:11.000000000 -0700
+++ tidyview-1.09.new/MANIFEST  2006-10-17 00:01:33.000000000 -0700
@@ -3,11 +3,11 @@
 lib/PerlTidy/t/Options.t
 lib/TidyView/Frame.pm
 lib/TidyView/Options.pm
+lib/TidyView/VERSION.pm
 lib/TidyView/t/Frame.t
 lib/TidyView/t/Options.t
 lib/TidyView/Text.pm
 lib/TidyView/t/Text.t
-lib/VERSION.pm
 bin/log.conf
 Makefile.PL
 MANIFEST                       This list of files
diff -ru tidyview-1.09/Makefile.PL tidyview-1.09.new/Makefile.PL
--- tidyview-1.09/Makefile.PL   2006-08-10 19:03:04.000000000 -0700
+++ tidyview-1.09.new/Makefile.PL       2006-10-17 00:01:19.000000000 -0700
@@ -4,7 +4,7 @@
              NAME         => 'tidyview',
              ABSTRACT     => "Preview the effects of perltidy's plethora of 
options",
              AUTHOR       => "Leif Eriksen <[EMAIL PROTECTED]>",
-             VERSION_FROM => 'lib/VERSION.pm',
+             VERSION_FROM => 'lib/TidyView/VERSION.pm',
              PREREQ_PM    => {
                               'Tk'            => '800.025',
                               'Log::Log4perl' => '1.0',
diff -ru tidyview-1.09/bin/tidyview.pl tidyview-1.09.new/bin/tidyview.pl
--- tidyview-1.09/bin/tidyview.pl       2006-10-12 06:20:20.000000000 -0700
+++ tidyview-1.09.new/bin/tidyview.pl   2006-10-17 00:00:54.000000000 -0700
@@ -17,7 +17,7 @@
 use Getopt::Long;
 use Pod::Usage;
 
-use VERSION;                   # perhaps we should move this to 
TidyView::VERSION ?
+use TidyView::VERSION;
 
 use IO::File;
 
@@ -402,7 +402,7 @@
 # when tidyview called with -v|--version, do this...
 sub showVersion {
   print <<"EOM";
-This is tidyview, v$VERSION::VERSION
+This is tidyview, v$VERSION
 
 Copyright 2006, Leif Eriksen
 
diff -ru tidyview-1.09/lib/TidyView/Options.pm 
tidyview-1.09.new/lib/TidyView/Options.pm
--- tidyview-1.09/lib/TidyView/Options.pm       2006-10-12 06:36:21.000000000 
-0700
+++ tidyview-1.09.new/lib/TidyView/Options.pm   2006-10-16 23:58:59.000000000 
-0700
@@ -20,6 +20,9 @@
 
 use Log::Log4perl qw(get_logger);
 
+use version;
+
+
 =pod
 
 TidyView::Options - responsible for all the rendering tasks of the options 
supplied from PerlTidy::Options
@@ -57,22 +60,10 @@
  # Note that this is the reason we introduced the dependency of 'use version' 
- the overloaded
  # stringification and relational operators make comparing versions trivial.
 
- if ($^O !~ m/(?:win32|cygwin)/i) {
-
-   require version;
-
-   die $@  if $@;
-
-   import version qw(qv);
-
-   if (qv(Tk->VERSION()) < "804.027") { # is an out-of-date Tk
-     *_numericWidget = \&_numericAsTextbox;
-   } else {                             # is an up-to-date  Tk
-     *_numericWidget = \&_numericAsSpinbox;
-   }
- } else { # is windows, which cant distinquish between Version.pm and 
version.pm,
-          # and hence is cursed to use older Tk widgets.
+ if (qv(Tk->VERSION()) < "804.027") { # is an out-of-date Tk
    *_numericWidget = \&_numericAsTextbox;
+ } else {                             # is an up-to-date  Tk
+   *_numericWidget = \&_numericAsSpinbox;
  }
 }
 
--- /dev/null   2006-10-16 23:58:52.000000000 -0700
+++ tidyview-1.09.new/lib/TidyView/VERSION.pm   2006-10-17 00:00:43.000000000 
-0700
@@ -0,0 +1,14 @@
+package TidyView::VERSION;
+
+our $VERSION = sprintf("%d.%02d", q$Revision: 1.9 $ =~ /(\d+)\.(\d+)/);
+
+use base qw(Exporter);
[EMAIL PROTECTED] = qw($VERSION);
+
+1;
+
+__END__
+
+=head VERSION
+
+Holds the product version identifier
--- tidyview-1.09/lib/VERSION.pm        2006-10-16 01:25:04.000000000 -0700
+++ /dev/null   2006-10-16 23:58:52.000000000 -0700
@@ -1,11 +0,0 @@
-package VERSION;
-
-our $VERSION = sprintf("%d.%02d", q$Revision: 1.9 $ =~ /(\d+)\.(\d+)/);
-
-1;
-
-__END__
-
-=head VERSION
-
-Holds the product version identifier

Reply via email to