Skip to content

Commit

Permalink
Update _DEBUG sub to be more efficient.
Browse files Browse the repository at this point in the history
  • Loading branch information
juster committed May 8, 2010
1 parent f4ee0d5 commit f4545d9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/CPANPLUS/Dist/Arch.pm
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,11 @@ problem.
our ($Is_dependency, $PKGDEST, $PACKAGER, $DEBUG);

$PACKAGER = 'Anonymous';
$DEBUG = $ENV{DIST_ARCH_DEBUG};

sub _DEBUG
{
print STDERR '***DEBUG*** ', @_, "\n" if $DEBUG;
}
sub _DEBUG;
*_DEBUG = ( $ENV{DIST_ARCH_DEBUG}
? sub { print STDERR '***DEBUG*** ', @_, "\n" }
: sub { return } );

#---HELPER FUNCTION---
# Purpose: Expand environment variables and tildes like bash would.
Expand Down

0 comments on commit f4545d9

Please sign in to comment.