make sure VERSION is numified
[p5sagit/strictures.git] / lib / strictures.pm
index 4bad910..a64cc45 100644 (file)
@@ -8,6 +8,7 @@ BEGIN {
 }
 
 our $VERSION = '1.005005';
+$VERSION = eval $VERSION;
 
 sub VERSION {
   my ($class, $version) = @_;
@@ -37,10 +38,10 @@ sub import {
           . "please unset \$ENV{PERL_STRICTURES_EXTRA}\n";
       }
       $ENV{PERL_STRICTURES_EXTRA};
-    } elsif (_PERL_LT_5_8_4) {
+    } elsif (! _PERL_LT_5_8_4) {
       (caller)[1] =~ /^(?:t|xt|lib|blib)[\\\/]/
         and defined $Smells_Like_VCS ? $Smells_Like_VCS
-          : ( $Smells_Like_VCS = (
+          : ( $Smells_Like_VCS = !!(
             -e '.git' || -e '.svn' || -e '.hg'
             || (-e '../../dist.ini'
               && (-e '../../.git' || -e '../../.svn' || -e '../../.hg' ))