Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improve dir arg handling and document archdir usage

  • Loading branch information...
commit a8669a78231ad0a4f470c8c52b75f0a36b893343 1 parent ef8d441
@timbunce authored
Showing with 11 additions and 2 deletions.
  1. +8 −1 bin/dist_surveyor
  2. +3 −1 lib/Dist/Surveyor.pm
View
9 bin/dist_surveyor
@@ -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
+
=head1 DESCRIPTION
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
View
4 lib/Dist/Surveyor.pm
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.