Skip to content

Commit

Permalink
Lazy load Pod::Usage
Browse files Browse the repository at this point in the history
  • Loading branch information
dolmen committed Jul 24, 2015
1 parent 0392c08 commit 33ff8c3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions script/cpan-outdated
Expand Up @@ -3,7 +3,6 @@ use strict;
use warnings;
use ExtUtils::Installed;
use Getopt::Long;
use Pod::Usage;
use File::Temp;
use File::Spec;
use Config;
Expand All @@ -22,9 +21,10 @@ my $quote = WIN32 ? q/"/ : q/'/;
my $local_lib;
my $self_contained = 0;
my $index_file;
my $help;
Getopt::Long::Configure("bundling");
Getopt::Long::GetOptions(
'h|help' => \my $help,
'h|help' => \$help,
'verbose' => \my $verbose,
'm|mirror=s' => \$mirror,
'index' => \$index_file,
Expand All @@ -39,8 +39,11 @@ Getopt::Long::GetOptions(
. "cpanm cpan-listchanges # install from CPAN\n"
},
'exclude-core' => \my $exclude_core,
) or pod2usage();
pod2usage() if $help;
) or $help++;
if ($help) {
require Pod::Usage;
Pod::Usage::pod2usage();
}

$mirror =~ s:/$::;
my $index_url = "${mirror}/modules/02packages.details.txt.gz";
Expand Down

0 comments on commit 33ff8c3

Please sign in to comment.