Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

- fixes to verbose mode in Makefile.PL, also added a -v switch so you

  can enable it via the command-line
  Resolves: http://rt.cpan.org/NoAuth/Bug.html?id=16094
  • Loading branch information...
commit 855c5808a2661ad4b3b13a552dc05feb949012a7 1 parent 5d36cf2
authored November 25, 2005

Showing 2 changed files with 16 additions and 7 deletions. Show diff stats Hide diff stats

  1. 3  Changes
  2. 20  Makefile.PL
3  Changes
@@ -1177,6 +1177,9 @@ Revision history for Perl extension Imager.
1177 1177
   - more examples
1178 1178
   - add AUTHOR/REVISION/SEE ALSO
1179 1179
 - add samples/tk-photo.pl
  1180
+- fixes to verbose mode in Makefile.PL, also added a -v switch so you 
  1181
+  can enable it via the command-line
  1182
+  Resolves: http://rt.cpan.org/NoAuth/Bug.html?id=16094
1180 1183
 
1181 1184
 =================================================================
1182 1185
 
20  Makefile.PL
@@ -22,6 +22,8 @@ use Getopt::Long;
22 22
 # IM_DFLAGS       Extra flags to pass to the preprocessor
23 23
 # IM_SUPPRESS_PROMPT  Suppress the prompt asking about gif support
24 24
 
  25
+getenv();     # get environment variables
  26
+
25 27
 my $help;
26 28
 my @enable;
27 29
 my @disable;
@@ -33,7 +35,14 @@ GetOptions("help" => \$help,
33 35
            "disable=s" => \@disable,
34 36
            "incpath=s", \@incpaths,
35 37
            "libpath=s" => \@libpaths,
36  
-           "noprobe" => \$noprobe);
  38
+           "noprobe" => \$noprobe,
  39
+	   "verbose|v" => \$VERBOSE);
  40
+
  41
+if ($VERBOSE) { 
  42
+  print "Verbose mode\n"; 
  43
+  require Data::Dumper; 
  44
+  import Data::Dumper qw(Dumper);
  45
+}
37 46
 
38 47
 if ($help) {
39 48
   usage();
@@ -44,7 +53,6 @@ if (@enable && @disable) {
44 53
   exit 1;
45 54
 }
46 55
 
47  
-getenv();     # get environment variables
48 56
 init();       # initialize global data
49 57
 pathcheck();  # Check if directories exist
50 58
 
@@ -322,7 +330,7 @@ sub pathcheck {
322 330
 
323 331
   if ($VERBOSE) {
324 332
     print "\nLibrary paths:\n";
325  
-    for (@incs) { print $_,"\n"; }
  333
+    for (@libs) { print $_,"\n"; }
326 334
   }
327 335
   @libs=grep { -d $_ && -r _ && -x _ or ( print("  $_ doesnt exist or is unaccessible - removed.\n"),0) } @libs;
328 336
   print "\ndone.\n";
@@ -535,8 +543,6 @@ sub getenv {
535 543
 				IM_LFLAGS
536 544
 				IM_DFLAGS);
537 545
 
538  
-  if ($VERBOSE) { print "Verbose mode\n"; require Data::Dumper; import Data::Dumper qw(Dumper);}
539  
-
540 546
   if ($NOLOG)   { print "Logging not compiled into module\n"; }
541 547
   else { 
542 548
     push @defines, [ IMAGER_LOG => 1, "Logging system" ];
@@ -652,8 +658,8 @@ sub is_exe {
652 658
 
653 659
 sub usage {
654 660
   print STDERR <<EOS;
655  
-Usage: $0 [--enable feature1,feature2,...] [--incpath ...] [--libpath ...]
656  
-       $0 [--disable feature1,feature2,...] [--incpath ...] [--libpath ...]
  661
+Usage: $0 [-v] [--enable feature1,feature2,...] [--incpath ...] [--libpath ...]
  662
+       $0 [-v] [--disable feature1,feature2,...] [--incpath ...] [--libpath ...]
657 663
        $0 --help
658 664
 Possible feature names are:
659 665
   png gif ungif jpeg tiff T1-fonts TT-fonts freetype2

0 notes on commit 855c580

Please sign in to comment.
Something went wrong with that request. Please try again.