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

[SCM] Debian package checker branch, master, updated. 2.2.10-81-gf594b61



The following commit has been merged in the master branch:
commit 37df525eedb4041ab386dbbb9f4d96dc4418899e
Author: Raphael Geissert <atomo64@gmail.com>
Date:   Fri May 22 08:31:24 2009 -0500

    Example code in modules must pass a syntax and use strict check
    
    Test::Synopsis is required, but the test is skipped if not available.

diff --git a/lib/Lintian/Check.pm b/lib/Lintian/Check.pm
index 9bd5809..313e34f 100644
--- a/lib/Lintian/Check.pm
+++ b/lib/Lintian/Check.pm
@@ -37,6 +37,7 @@ Lintian::Check -- Lintian checks shared between multiple scripts
 
     use Lintian::Check qw(check_maintainer);
 
+    my ($maintainer, $field) = ('John Doe', 'uploader');
     check_maintainer ($maintainer, $field);
 
 =head1 DESCRIPTION
diff --git a/lib/Lintian/Collect.pm b/lib/Lintian/Collect.pm
index 00b5159..599c415 100644
--- a/lib/Lintian/Collect.pm
+++ b/lib/Lintian/Collect.pm
@@ -76,6 +76,7 @@ Lintian::Collect - Lintian interface to package data collection
 
 =head1 SYNOPSIS
 
+    my ($name, $type) = ('foobar', 'udeb');
     my $collect = Lintian::Collect->new($name, $type);
     $name = $collect->name;
     $type = $collect->type;
diff --git a/lib/Lintian/Collect/Binary.pm b/lib/Lintian/Collect/Binary.pm
index a44fdef..c3559dd 100644
--- a/lib/Lintian/Collect/Binary.pm
+++ b/lib/Lintian/Collect/Binary.pm
@@ -296,6 +296,7 @@ Lintian::Collect::Binary - Lintian interface to binary package data collection
 
 =head1 SYNOPSIS
 
+    my ($name, $type) = ('foobar', 'binary');
     my $collect = Lintian::Collect->new($name, $type);
     if ($collect->native) {
         print "Package is native\n";
diff --git a/lib/Lintian/Collect/Source.pm b/lib/Lintian/Collect/Source.pm
index 959245b..f362daa 100644
--- a/lib/Lintian/Collect/Source.pm
+++ b/lib/Lintian/Collect/Source.pm
@@ -227,6 +227,7 @@ Lintian::Collect::Source - Lintian interface to source package data collection
 
 =head1 SYNOPSIS
 
+    my ($name, $type) = ('foobar', 'source');
     my $collect = Lintian::Collect->new($name, $type);
     if ($collect->native) {
         print "Package is native\n";
diff --git a/lib/Lintian/Data.pm b/lib/Lintian/Data.pm
index e529069..5556bf6 100644
--- a/lib/Lintian/Data.pm
+++ b/lib/Lintian/Data.pm
@@ -82,6 +82,7 @@ Lintian::Data - Lintian interface to query lists of keywords
 
 =head1 SYNOPSIS
 
+    my $keyword;
     my $list = Lintian::Data->new('type');
     if ($list->known($keyword)) {
         # do something ...
diff --git a/lib/Lintian/Output.pm b/lib/Lintian/Output.pm
index 7123e49..bb0ed82 100644
--- a/lib/Lintian/Output.pm
+++ b/lib/Lintian/Output.pm
@@ -44,7 +44,7 @@ Lintian::Output - Lintian messaging handling
 =head1 SYNOPSIS
 
     # non-OO
-    use Lintian::Output qw(:messages)
+    use Lintian::Output qw(:messages);
 
     $Lintian::Output::GLOBAL->verbose(1);
 
diff --git a/lib/Lintian/Tag/Info.pm b/lib/Lintian/Tag/Info.pm
index f4f198e..176aa9e 100644
--- a/lib/Lintian/Tag/Info.pm
+++ b/lib/Lintian/Tag/Info.pm
@@ -49,7 +49,7 @@ Lintian::Tag::Info - Lintian interface to tag metadata
 
 =head1 SYNOPSIS
 
-    my $tag = Lintian::Tag::Info->new('some-tag');
+    my $tag_info = Lintian::Tag::Info->new('some-tag');
     print "Tag info is:\n";
     print $tag_info->description('text', '   ');
     print "\nTag info in HTML is:\n";
diff --git a/t/scripts/pod-synopsis.t b/t/scripts/pod-synopsis.t
new file mode 100644
index 0000000..4dc32ef
--- /dev/null
+++ b/t/scripts/pod-synopsis.t
@@ -0,0 +1,10 @@
+#!/usr/bin/perl
+
+use Test::More;
+use Test::Pod;
+eval "use Test::Synopsis";
+plan skip_all => "Test::Synopsis required for testing" if $@;
+
+my @pod_files = all_pod_files("$ENV{'LINTIAN_ROOT'}/lib");
+plan tests => scalar(@pod_files);
+synopsis_ok(@pod_files);

-- 
Debian package checker


Reply to: