The following commit has been merged in the master branch:
commit 0e9631839fe574d38826392c59850c0dc58300aa
Author: Niels Thykier <[email protected]>
Date:   Tue Jan 22 10:48:19 2013 +0100

    L::C::Package: Clarify that dirs needs trailing slashes
    
    Signed-off-by: Niels Thykier <[email protected]>

diff --git a/lib/Lintian/Collect/Package.pm b/lib/Lintian/Collect/Package.pm
index 49f9397..57cd16d 100644
--- a/lib/Lintian/Collect/Package.pm
+++ b/lib/Lintian/Collect/Package.pm
@@ -164,7 +164,11 @@ sub file_info {
 Returns a L<path object|Lintian::Path> to FILE in the package.  FILE
 must be relative to the root of the unpacked package and must be
 without leading slash (or "./").  If FILE is not in the package, it
-returns C<undef>.
+returns C<undef>.  If FILE is supposed to be a directory, it must be
+given with a trailing slash.  Example:
+
+  my $file = $info->index ("usr/bin/lintian");
+  my $dir = $info->index ("usr/bin/");
 
 To get a list of entries in the package, see L</sorted_index>.  To
 actually access the underlying file (e.g. the contents), use

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to