[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

lintian: r808 - trunk/lib



Author: jaalto
Date: 2007-01-30 08:32:01 +0100 (Tue, 30 Jan 2007)
New Revision: 808

Modified:
   trunk/lib/Manual_refs.pm
Log:
* lib/Manual_refs.pm:
  + [JA] Perl -cw fixes. Check against not set $ENV{LINTIAN_ROOT}. Support
    running the libraries "in place" from a VCS checkout.

  Fixes:

  Use of uninitialized value in concatenation (.) or string at lib/Manual_refs.pm line 29.
  Could not open manual_refs: No such file or directory at lib/Manual_refs.pm line 29.
  Compilation failed in require at lib/Read_taginfo.pm line 28.
  BEGIN failed--compilation aborted at lib/Read_taginfo.pm line 28.
  Compilation failed in require at ./reporting/html_reports line 43.
  BEGIN failed--compilation aborted at ./reporting/html_reports line 43.



Modified: trunk/lib/Manual_refs.pm
===================================================================
--- trunk/lib/Manual_refs.pm	2007-01-30 07:28:12 UTC (rev 807)
+++ trunk/lib/Manual_refs.pm	2007-01-30 07:32:01 UTC (rev 808)
@@ -19,22 +19,28 @@
 use strict;
 
 # define hash for manuals
-my %manual = (
-	   'policy' => 'Policy Manual',
-	   'devref' => 'Developers Reference',
-	   'fhs' => 'FHS',
-	   );
+my %manual =
+(
+ 'policy' => 'Policy Manual',
+ 'devref' => 'Developers Reference',
+ 'fhs'    => 'FHS',
+);
 
 my %url;
-open(REFS, "$ENV{'LINTIAN_ROOT'}/lib/manual_refs") or
-    die("Could not open manual_refs: $!");
+
+my $lib = defined $ENV{LINTIAN_ROOT} ?  "$ENV{LINTIAN_ROOT}/" : "";
+
+open REFS, "$ {lib}lib/manual_refs" or
+    die "Could not open manual_refs: $!";
+
 while(<REFS>) {
     chomp;
-    next if (m/^\s*\#/);
+    next if m/^\s*\#/;
 
     my ($key, $data) = split;
     $url{$key} = $data;
 }
-close(REFS);
 
+close REFS;
+
 1;



Reply to: