Browse files

Improve dir arg handling and document archdir usage

  • Loading branch information...
1 parent ef8d441 commit a8669a78231ad0a4f470c8c52b75f0a36b893343 @timbunce committed Nov 22, 2011
Showing with 11 additions and 2 deletions.
  1. +8 −1 bin/dist_surveyor
  2. +3 −1 lib/Dist/
@@ -8,6 +8,13 @@ dist_surveyor - determine exactly what dist versions are installed
dist_surveyor [options] /some/perl/lib/dir
+Typically a perl library directory will have an architecture specific library
+as a subdirectory. The dist_surveyor script will detect and add it automatically
+if the perl being used has the same 'archname' the same as the one in the library.
+If not, then specify the "archlib" directory explicitly I<first>:
+ dist_surveyor [options] /some/perl/lib/dir/archname /some/perl/lib/dir
This utility examines all the modules installed within the specified perl
@@ -135,7 +142,7 @@ use warnings;
$| = 1;
-require Dist::Surveyor;
+use Dist::Surveyor;
# XXX nasty quick hack conversion from script to module
# TODO refactor to give Dist::Surveyor a reasonable simple API
@@ -124,7 +124,9 @@ my %distro_key_mod_names = (
sub main {
# give only top-level lib dir, the archlib will be added automatically
-my @libdir = shift @ARGV or die "No perl lib directory specified\n";
+die "Usage: $0 perl-lib-directory\n"
+ unless @ARGV;
+my @libdir = @ARGV;
die "$libdir[0] isn't a directory\n" unless -d $libdir[0];
my $archdir = "$libdir[0]/$Config{archname}";
if (-d $archdir) {

0 comments on commit a8669a7

Please sign in to comment.