Added lots more modules from lintian. Maemian appears to work.
[maemian] / lib / Maemian / Tag / Info.pm
index fc173a6..8763c2d 100644 (file)
@@ -1,5 +1,5 @@
 # -*- perl -*-
 # -*- perl -*-
-# Lintian::Tag::Info -- interface to tag metadata
+# Maemian::Tag::Info -- interface to tag metadata
 
 # Copyright (C) 1998 Christian Schwarz and Richard Braakman
 # Copyright (C) 2009 Russ Allbery
 
 # Copyright (C) 1998 Christian Schwarz and Richard Braakman
 # Copyright (C) 2009 Russ Allbery
@@ -45,11 +45,11 @@ our %MANUALS;
 
 =head1 NAME
 
 
 =head1 NAME
 
-Lintian::Tag::Info - Lintian interface to tag metadata
+Maemian::Tag::Info - Maemian interface to tag metadata
 
 =head1 SYNOPSIS
 
 
 =head1 SYNOPSIS
 
-    my $tag = Lintian::Tag::Info->new('some-tag');
+    my $tag = Maemian::Tag::Info->new('some-tag');
     print "Tag info is:\n";
     print $tag_info->description('text', '   ');
     print "\nTag info in HTML is:\n";
     print "Tag info is:\n";
     print $tag_info->description('text', '   ');
     print "\nTag info in HTML is:\n";
@@ -68,14 +68,14 @@ used to retrieve other metadata about tags.
 
 =item new(TAG)
 
 
 =item new(TAG)
 
-Creates a new Lintian::Tag::Info object for the given TAG.  Returns undef
+Creates a new Maemian::Tag::Info object for the given TAG.  Returns undef
 if the tag is unknown and throws an exception if there is a parse error
 reading the check description files or if TAG is not specified.
 
 The first time this method is called, all tag metadata will be loaded into
 a memory cache.  This information will be used to satisfy all subsequent
 if the tag is unknown and throws an exception if there is a parse error
 reading the check description files or if TAG is not specified.
 
 The first time this method is called, all tag metadata will be loaded into
 a memory cache.  This information will be used to satisfy all subsequent
-Lintian::Tag::Info object creation, avoiding multiple file reads.  This
-however means that a running Lintian process will not notice changes to
+Maemian::Tag::Info object creation, avoiding multiple file reads.  This
+however means that a running Maemian process will not notice changes to
 tag metadata on disk.
 
 =cut
 tag metadata on disk.
 
 =cut
@@ -83,7 +83,7 @@ tag metadata on disk.
 # Load all tag data into the %INFO hash.  Called by new() if %INFO is
 # empty and hence called the first time new() is called.
 sub _load_tag_data {
 # Load all tag data into the %INFO hash.  Called by new() if %INFO is
 # empty and hence called the first time new() is called.
 sub _load_tag_data {
-    my $root = $ENV{LINTIAN_ROOT} || '/usr/share/lintian';
+    my $root = $ENV{MAEMIAN_ROOT} || '/usr/share/lintian';
     for my $desc (<$root/checks/*.desc>) {
         debug_msg(2, "Reading checker description file $desc ...");
         my ($header, @tags) = read_dpkg_control($desc);
     for my $desc (<$root/checks/*.desc>) {
         debug_msg(2, "Reading checker description file $desc ...");
         my ($header, @tags) = read_dpkg_control($desc);
@@ -138,11 +138,11 @@ formatted output.
 
 # Load manual reference data into %MANUALS.  This information doesn't have
 # a single unique key and has multiple data values per key, so we don't
 
 # Load manual reference data into %MANUALS.  This information doesn't have
 # a single unique key and has multiple data values per key, so we don't
-# try to use the Lintian::Data interface.  Instead, we read a file
-# delimited by double colons.  We do use a path similar to Lintian::Data
+# try to use the Maemian::Data interface.  Instead, we read a file
+# delimited by double colons.  We do use a path similar to Maemian::Data
 # to keep such files in the same general location.
 sub _load_manual_data {
 # to keep such files in the same general location.
 sub _load_manual_data {
-    my $root = $ENV{LINTIAN_ROOT} || '/usr/share/lintian';
+    my $root = $ENV{MAEMIAN_ROOT} || '/usr/share/lintian';
     open(REFS, '<', "$root/data/output/manual-references")
         or fail("can't open $root/data/output/manual-references: $!");
     local $_;
     open(REFS, '<', "$root/data/output/manual-references")
         or fail("can't open $root/data/output/manual-references: $!");
     local $_;
@@ -158,7 +158,7 @@ sub _load_manual_data {
     close REFS;
 }
 
     close REFS;
 }
 
-# Format a reference to a manual in the HTML that Lintian uses internally
+# Format a reference to a manual in the HTML that Maemian uses internally
 # for tag descriptions and return the result.  Takes the name of the
 # manual and the name of the section.  Returns an empty string if the
 # argument isn't a known manual.
 # for tag descriptions and return the result.  Takes the name of the
 # manual and the name of the section.  Returns an empty string if the
 # argument isn't a known manual.
@@ -248,7 +248,7 @@ sub description {
     if ($self->{experimental}) {
         push(@text, '',
              'This tag is marked experimental, which means that the code that'
     if ($self->{experimental}) {
         push(@text, '',
              'This tag is marked experimental, which means that the code that'
-             . ' generates it is not as well-tested as the rest of Lintian'
+             . ' generates it is not as well-tested as the rest of Maemian'
              . ' and might still give surprising results.  Feel free to'
              . ' ignore experimental tags that do not seem to make sense,'
              . ' though of course bug reports are always welcomed.');
              . ' and might still give surprising results.  Feel free to'
              . ' ignore experimental tags that do not seem to make sense,'
              . ' though of course bug reports are always welcomed.');
@@ -272,7 +272,7 @@ The following exceptions may be thrown:
 
 =item no tag specified
 
 
 =item no tag specified
 
-The Lintian::Tag::Info::new constructor was called without passing a tag
+The Maemian::Tag::Info::new constructor was called without passing a tag
 as an argument.
 
 =item unknown output format %s
 as an argument.
 
 =item unknown output format %s
@@ -288,7 +288,7 @@ The following fatal internal errors may be reported:
 
 =item can't open %s: %s
 
 
 =item can't open %s: %s
 
-The specified file, which should be part of the standard Lintian data
+The specified file, which should be part of the standard Maemian data
 files, could not be opened.  The file may be missing or have the wrong
 permissions.
 
 files, could not be opened.  The file may be missing or have the wrong
 permissions.
 
@@ -309,12 +309,12 @@ field.
 
 =over 4
 
 
 =over 4
 
-=item LINTIAN_ROOT/checks/*.desc
+=item MAEMIAN_ROOT/checks/*.desc
 
 The tag description files, from which tag metadata is read.  All files
 matching this shell glob expression will be read looking for tag data.
 
 
 The tag description files, from which tag metadata is read.  All files
 matching this shell glob expression will be read looking for tag data.
 
-=item LINTIAN_ROOT/data/output/manual-references
+=item MAEMIAN_ROOT/data/output/manual-references
 
 Information about manual references.  Each non-comment, non-empty line of
 this file contains four fields separated by C<::>.  The first field is the
 
 Information about manual references.  Each non-comment, non-empty line of
 this file contains four fields separated by C<::>.  The first field is the
@@ -328,9 +328,9 @@ is the URL.  The URL is optional.
 
 =over 4
 
 
 =over 4
 
-=item LINTIAN_ROOT
+=item MAEMIAN_ROOT
 
 
-This variable specifies Lintian's root directory.  It defaults to
+This variable specifies Maemian's root directory.  It defaults to
 F</usr/share/lintian> if not set.  The B<lintian> program normally takes
 care of setting it.
 
 F</usr/share/lintian> if not set.  The B<lintian> program normally takes
 care of setting it.
 
@@ -338,7 +338,7 @@ care of setting it.
 
 =head1 AUTHOR
 
 
 =head1 AUTHOR
 
-Originally written by Russ Allbery <rra@debian.org> for Lintian.
+Originally written by Russ Allbery <rra@debian.org> for Maemian.
 
 =head1 SEE ALSO
 
 
 =head1 SEE ALSO