lintian: r492 - trunk/frontend
Author: djpig
Date: 2005-09-21 21:59:03 +0200 (Wed, 21 Sep 2005)
New Revision: 492
Modified:
trunk/frontend/lintian
Log:
Add new options --exp-output with which one can test the new output formats.
Not documented yet and not intended for users
Modified: trunk/frontend/lintian
===================================================================
--- trunk/frontend/lintian 2005-09-21 19:57:02 UTC (rev 491)
+++ trunk/frontend/lintian 2005-09-21 19:59:03 UTC (rev 492)
@@ -64,6 +64,8 @@
my $LINTIAN_CFG = ""; #config file to use
our $LINTIAN_ROOT; #location of the lintian modules
+my $experimental_output_opts = undef;
+
my @packages;
my $action;
@@ -274,6 +276,9 @@
"source|s" => \&record_pkgmode,
"udeb" => \&record_pkgmode,
"packages-file|p=s" => \$packages_file,
+
+ # ------------------ experimental
+ "exp-output:s" => \$experimental_output_opts,
);
# init commandline parser
@@ -853,7 +858,22 @@
require Tags;
import Tags;
-no warnings;
+no warnings 'once';
+if (defined $experimental_output_opts) {
+ $Tags::output_formatter = \&Tags::print_tag_new;
+ my %opts = map { split(/=/) } split( /,/, $experimental_output_opts );
+ foreach (keys %opts) {
+ if ($_ eq 'format') {
+ if ($opts{$_} eq 'colons') {
+ require Tags::ColonSeparated;
+ $Tags::output_formatter = \&Tags::ColonSeparated::print_tag;
+ }
+ }
+ no strict 'refs';
+ ${"Tags::$_"} = $opts{$_};
+ }
+}
+
$Tags::show_info = $display_infotags;
$Tags::show_overrides = $show_overrides;
use warnings;
Reply to: