Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed all 'print STDOUT' to 'print' and 'print STDERR' to 'warn' [r…

…t.cpan.org 57008]
  • Loading branch information...
commit 97a8247fe2d726f80a1d6506fae6a1d3f2853908 1 parent dce5dda
@neilbowers authored
View
6 lib/ExtUtils/MM_Any.pm
@@ -1811,7 +1811,7 @@ sub init_INSTALL_from_PREFIX {
my($s, $t, $d, $style) = @{$layout}{qw(s t d style)};
my $r = '$('.$type2prefix{$t}.')';
- print STDERR "Prefixing $var\n" if $Verbose >= 2;
+ warn "Prefixing $var\n" if $Verbose >= 2;
my $installvar = "install$var";
my $Installvar = uc $installvar;
@@ -1820,7 +1820,7 @@ sub init_INSTALL_from_PREFIX {
$d = "$style/$d" if $style;
$self->prefixify($installvar, $s, $r, $d);
- print STDERR " $Installvar == $self->{$Installvar}\n"
+ warn " $Installvar == $self->{$Installvar}\n"
if $Verbose >= 2;
}
@@ -2383,7 +2383,7 @@ sub arch_check {
my $arch = (grep length, $self->splitdir($pthinks))[-1];
- print STDOUT <<END unless $self->{UNINSTALLED_PERL};
+ print <<END unless $self->{UNINSTALLED_PERL};
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [$arch]
View
30 lib/ExtUtils/MM_Unix.pm
@@ -217,7 +217,7 @@ sub cflags {
( $name = $self->{NAME} . "_cflags" ) =~ s/:/_/g ;
if ($prog = $Config{$name}) {
# Expand hints for this extension via the shell
- print STDOUT "Processing $name hint:\n" if $Verbose;
+ print "Processing $name hint:\n" if $Verbose;
my(@o)=`cc=\"$cflags{cc}\"
ccflags=\"$cflags{ccflags}\"
optimize=\"$cflags{optimize}\"
@@ -234,9 +234,9 @@ sub cflags {
chomp $line;
if ($line =~ /(.*?)=\s*(.*)\s*$/){
$cflags{$1} = $2;
- print STDOUT " $1 = $2\n" if $Verbose;
+ print " $1 = $2\n" if $Verbose;
} else {
- print STDOUT "Unrecognised result from hint: '$line'\n";
+ print "Unrecognised result from hint: '$line'\n";
}
}
}
@@ -1064,7 +1064,7 @@ WARNING
}
}
}
- print STDOUT "Unable to find a perl $ver (by these names: @$names, in these dirs: @$dirs)\n";
+ print "Unable to find a perl $ver (by these names: @$names, in these dirs: @$dirs)\n";
0; # false and not empty
}
@@ -1177,7 +1177,7 @@ sub _fixin_replace_shebang {
my ($does_shbang) = $Config{'sharpbang'} =~ /^\s*\#\!/;
my ($shb) = "";
if ($interpreter) {
- print STDOUT "Changing sharpbang in $file to $interpreter"
+ print "Changing sharpbang in $file to $interpreter"
if $Verbose;
# this is probably value-free on DOSISH platforms
if ($does_shbang) {
@@ -1682,7 +1682,7 @@ from the perl source tree.
$self->{PERL_ARCHLIB} = $lib;
$self->{PERL_INC} = $inc;
$self->{UNINSTALLED_PERL} = 1;
- print STDOUT <<EOP;
+ print <<EOP;
... Detected uninstalled Perl. Trying to continue.
EOP
}
@@ -1701,7 +1701,7 @@ EOP
$self->{MAN3EXT} ||= $Config{man3ext};
# Get some stuff out of %Config if we haven't yet done so
- print STDOUT "CONFIG must be an array ref\n"
+ print "CONFIG must be an array ref\n"
if ($self->{CONFIG} and ref $self->{CONFIG} ne 'ARRAY');
$self->{CONFIG} = [] unless (ref $self->{CONFIG});
push(@{$self->{CONFIG}}, @ExtUtils::MakeMaker::Get_from_Config);
@@ -1709,7 +1709,7 @@ EOP
my(%once_only);
foreach my $m (@{$self->{CONFIG}}){
next if $once_only{$m};
- print STDOUT "CONFIG key '$m' does not exist in Config.pm\n"
+ print "CONFIG key '$m' does not exist in Config.pm\n"
unless exists $Config{$m};
$self->{uc $m} ||= $Config{$m};
$once_only{$m} = 1;
@@ -1819,11 +1819,11 @@ sub init_lib2arch {
$self->prefixify($Arch,$ilib,$self->{$Lib});
unless (-d $self->{$Arch}) {
- print STDOUT "Directory $self->{$Arch} not found\n"
+ print "Directory $self->{$Arch} not found\n"
if $Verbose;
$self->{$Arch} = $self->{$Lib};
}
- print STDOUT "Defaulting $Arch to $self->{$Arch}\n" if $Verbose;
+ print "Defaulting $Arch to $self->{$Arch}\n" if $Verbose;
}
}
}
@@ -2423,7 +2423,7 @@ MAP_PRELIBS = $Config{perllibs} $Config{cryptlib}
}
}
- print STDOUT "Warning: $libperl not found
+ print "Warning: $libperl not found
If you're going to build a static perl binary, make sure perl is installed
otherwise ignore this warning\n"
unless (-f $lperl || defined($self->{PERL_SRC}));
@@ -3004,15 +3004,15 @@ sub prefixify {
$rprefix .= '/' if $sprefix =~ m|/$|;
- print STDERR " prefixify $var => $path\n" if $Verbose >= 2;
- print STDERR " from $sprefix to $rprefix\n" if $Verbose >= 2;
+ warn " prefixify $var => $path\n" if $Verbose >= 2;
+ warn " from $sprefix to $rprefix\n" if $Verbose >= 2;
if( $self->{ARGS}{PREFIX} &&
$path !~ s{^\Q$sprefix\E\b}{$rprefix}s )
{
- print STDERR " cannot prefix, using default.\n" if $Verbose >= 2;
- print STDERR " no default!\n" if !$default && $Verbose >= 2;
+ warn " cannot prefix, using default.\n" if $Verbose >= 2;
+ warn " no default!\n" if !$default && $Verbose >= 2;
$path = $self->catdir($rprefix, $default) if $default;
}
View
28 lib/ExtUtils/MM_VMS.pm
@@ -134,13 +134,13 @@ sub guess_name {
last;
}
}
- print STDOUT "Warning (non-fatal): Couldn't find package name in ${defpm}.pm;\n\t",
+ print "Warning (non-fatal): Couldn't find package name in ${defpm}.pm;\n\t",
"defaulting package name to $defname\n"
if eof($pm);
close $pm;
}
else {
- print STDOUT "Warning (non-fatal): Couldn't find ${defpm}.pm;\n\t",
+ print "Warning (non-fatal): Couldn't find ${defpm}.pm;\n\t",
"defaulting package name to $defname\n";
}
$defname =~ s#[\d.\-_]+$##;
@@ -244,7 +244,7 @@ sub find_perl {
return "MCR $vmsfile";
}
}
- print STDOUT "Unable to find a perl $ver (by these names: @$names, in these dirs: @$dirs)\n";
+ print "Unable to find a perl $ver (by these names: @$names, in these dirs: @$dirs)\n";
0; # false and not empty
}
@@ -697,7 +697,7 @@ sub cflags {
my($name,$sys,@m);
( $name = $self->{NAME} . "_cflags" ) =~ s/:/_/g ;
- print STDOUT "Unix shell script ".$Config{"$self->{'BASEEXT'}_cflags"}.
+ print "Unix shell script ".$Config{"$self->{'BASEEXT'}_cflags"}.
" required to modify CC command for $self->{'BASEEXT'}\n"
if ($Config{$name});
@@ -1513,7 +1513,7 @@ $(MAP_TARGET) :: $(MAKE_APERL_FILE)
push @optlibs, grep { !/PerlShr/i } split ' ', +($self->ext())[2];
if ($libperl) {
unless (-f $libperl || -f ($libperl = $self->catfile($Config{'installarchlib'},'CORE',$libperl))) {
- print STDOUT "Warning: $libperl not found\n";
+ print "Warning: $libperl not found\n";
undef $libperl;
}
}
@@ -1522,7 +1522,7 @@ $(MAP_TARGET) :: $(MAKE_APERL_FILE)
$libperl = $self->catfile($self->{PERL_SRC},"libperl$self->{LIB_EXT}");
} elsif (-f ($libperl = $self->catfile($Config{'installarchlib'},'CORE',"libperl$self->{LIB_EXT}")) ) {
} else {
- print STDOUT "Warning: $libperl not found
+ print "Warning: $libperl not found
If you're going to build a static perl binary, make sure perl is installed
otherwise ignore this warning\n";
}
@@ -1651,23 +1651,23 @@ sub prefixify {
$Config{lc $var} || $Config{lc $var_no_install};
if( !$path ) {
- print STDERR " no Config found for $var.\n" if $Verbose >= 2;
+ warn " no Config found for $var.\n" if $Verbose >= 2;
$path = $self->_prefixify_default($rprefix, $default);
}
elsif( !$self->{ARGS}{PREFIX} || !$self->file_name_is_absolute($path) ) {
# do nothing if there's no prefix or if its relative
}
elsif( $sprefix eq $rprefix ) {
- print STDERR " no new prefix.\n" if $Verbose >= 2;
+ warn " no new prefix.\n" if $Verbose >= 2;
}
else {
- print STDERR " prefixify $var => $path\n" if $Verbose >= 2;
- print STDERR " from $sprefix to $rprefix\n" if $Verbose >= 2;
+ warn " prefixify $var => $path\n" if $Verbose >= 2;
+ warn " from $sprefix to $rprefix\n" if $Verbose >= 2;
my($path_vol, $path_dirs) = $self->splitpath( $path );
if( $path_vol eq $Config{vms_prefix}.':' ) {
- print STDERR " $Config{vms_prefix}: seen\n" if $Verbose >= 2;
+ warn " $Config{vms_prefix}: seen\n" if $Verbose >= 2;
$path_dirs =~ s{^\[}{\[.} unless $path_dirs =~ m{^\[\.};
$path = $self->_catprefix($rprefix, $path_dirs);
@@ -1685,14 +1685,14 @@ sub prefixify {
sub _prefixify_default {
my($self, $rprefix, $default) = @_;
- print STDERR " cannot prefix, using default.\n" if $Verbose >= 2;
+ warn " cannot prefix, using default.\n" if $Verbose >= 2;
if( !$default ) {
- print STDERR "No default!\n" if $Verbose >= 1;
+ warn "No default!\n" if $Verbose >= 1;
return;
}
if( !$rprefix ) {
- print STDERR "No replacement prefix!\n" if $Verbose >= 1;
+ warn "No replacement prefix!\n" if $Verbose >= 1;
return '';
}
View
42 lib/ExtUtils/MakeMaker.pm
@@ -431,7 +431,7 @@ sub new {
$self->_PRINT_PREREQ;
}
- print STDOUT "MakeMaker (v$VERSION)\n" if $Verbose;
+ print "MakeMaker (v$VERSION)\n" if $Verbose;
if (-f "MANIFEST" && ! -f "Makefile" && ! $ENV{PERL_CORE}){
check_manifest();
}
@@ -795,18 +795,18 @@ END
sub check_manifest {
- print STDOUT "Checking if your kit is complete...\n";
+ print "Checking if your kit is complete...\n";
require ExtUtils::Manifest;
# avoid warning
$ExtUtils::Manifest::Quiet = $ExtUtils::Manifest::Quiet = 1;
my(@missed) = ExtUtils::Manifest::manicheck();
if (@missed) {
- print STDOUT "Warning: the following files are missing in your kit:\n";
+ print "Warning: the following files are missing in your kit:\n";
print "\t", join "\n\t", @missed;
- print STDOUT "\n";
- print STDOUT "Please inform the author.\n";
+ print "\n";
+ print "Please inform the author.\n";
} else {
- print STDOUT "Looks good\n";
+ print "Looks good\n";
}
}
@@ -834,9 +834,9 @@ sub parse_args{
if (defined $self->{potential_libs}){
my($msg)="'potential_libs' => '$self->{potential_libs}' should be";
if ($self->{potential_libs}){
- print STDOUT "$msg changed to:\n\t'LIBS' => ['$self->{potential_libs}']\n";
+ print "$msg changed to:\n\t'LIBS' => ['$self->{potential_libs}']\n";
} else {
- print STDOUT "$msg deleted.\n";
+ print "$msg deleted.\n";
}
$self->{LIBS} = [$self->{potential_libs}];
delete $self->{potential_libs};
@@ -844,14 +844,14 @@ sub parse_args{
# catch old-style 'ARMAYBE' and inform user how to 'upgrade'
if (defined $self->{ARMAYBE}){
my($armaybe) = $self->{ARMAYBE};
- print STDOUT "ARMAYBE => '$armaybe' should be changed to:\n",
+ print "ARMAYBE => '$armaybe' should be changed to:\n",
"\t'dynamic_lib' => {ARMAYBE => '$armaybe'}\n";
my(%dl) = %{$self->{dynamic_lib} || {}};
$self->{dynamic_lib} = { %dl, ARMAYBE => $armaybe};
delete $self->{ARMAYBE};
}
if (defined $self->{LDTARGET}){
- print STDOUT "LDTARGET should be changed to LDFROM\n";
+ print "LDTARGET should be changed to LDFROM\n";
$self->{LDFROM} = $self->{LDTARGET};
delete $self->{LDTARGET};
}
@@ -873,8 +873,8 @@ sub parse_args{
foreach my $mmkey (sort keys %$self){
next if $mmkey eq 'ARGS';
- print STDOUT " $mmkey => ", neatvalue($self->{$mmkey}), "\n" if $Verbose;
- print STDOUT "'$mmkey' is not a known MakeMaker parameter name.\n"
+ print " $mmkey => ", neatvalue($self->{$mmkey}), "\n" if $Verbose;
+ print "'$mmkey' is not a known MakeMaker parameter name.\n"
unless exists $Recognized_Att_Keys{$mmkey};
}
$| = 1 if $Verbose;
@@ -915,7 +915,7 @@ sub _run_hintfile {
my($hint_file) = shift;
local($@, $!);
- print STDERR "Processing hints file $hint_file\n";
+ warn "Processing hints file $hint_file\n";
# Just in case the ./ isn't on the hint file, which File::Spec can
# often strip off, we bung the curdir into @INC
@@ -923,7 +923,7 @@ sub _run_hintfile {
my $ret = do $hint_file;
if( !defined $ret ) {
my $error = $@ || $!;
- print STDERR $error;
+ warn $error;
}
}
@@ -993,20 +993,20 @@ sub skipcheck {
my($self) = shift;
my($section) = @_;
if ($section eq 'dynamic') {
- print STDOUT "Warning (non-fatal): Target 'dynamic' depends on targets ",
+ print "Warning (non-fatal): Target 'dynamic' depends on targets ",
"in skipped section 'dynamic_bs'\n"
if $self->{SKIPHASH}{dynamic_bs} && $Verbose;
- print STDOUT "Warning (non-fatal): Target 'dynamic' depends on targets ",
+ print "Warning (non-fatal): Target 'dynamic' depends on targets ",
"in skipped section 'dynamic_lib'\n"
if $self->{SKIPHASH}{dynamic_lib} && $Verbose;
}
if ($section eq 'dynamic_lib') {
- print STDOUT "Warning (non-fatal): Target '\$(INST_DYNAMIC)' depends on ",
+ print "Warning (non-fatal): Target '\$(INST_DYNAMIC)' depends on ",
"targets in skipped section 'dynamic_bs'\n"
if $self->{SKIPHASH}{dynamic_bs} && $Verbose;
}
if ($section eq 'static') {
- print STDOUT "Warning (non-fatal): Target 'static' depends on targets ",
+ print "Warning (non-fatal): Target 'static' depends on targets ",
"in skipped section 'static_lib'\n"
if $self->{SKIPHASH}{static_lib} && $Verbose;
}
@@ -1018,7 +1018,7 @@ sub flush {
my $self = shift;
my $finalname = $self->{MAKEFILE};
- print STDOUT "Writing $finalname for $self->{NAME}\n";
+ print "Writing $finalname for $self->{NAME}\n";
unlink($finalname, "MakeMaker.tmp", $Is_VMS ? 'Descrip.MMS' : ());
open(my $fh,">", "MakeMaker.tmp")
@@ -1037,8 +1037,8 @@ sub flush {
unless ($self->{NO_MYMETA}) {
# Write MYMETA.yml to communicate metadata up to the CPAN clients
- if ( $self->write_mymeta( $self->mymeta ) ) {;
- print STDOUT "Writing MYMETA.yml and MYMETA.json\n";
+ if ( $self->write_mymeta( $self->mymeta ) ) {
+ print "Writing MYMETA.yml and MYMETA.json\n";
}
}
View
6 lib/ExtUtils/Mkbootstrap.pm
@@ -18,7 +18,7 @@ sub Mkbootstrap {
my($baseext, @bsloadlibs)=@_;
@bsloadlibs = grep($_, @bsloadlibs); # strip empty libs
- print STDOUT " bsloadlibs=@bsloadlibs\n" if $Verbose;
+ print " bsloadlibs=@bsloadlibs\n" if $Verbose;
# We need DynaLoader here because we and/or the *_BS file may
# call dl_findfile(). We don't say `use' here because when
@@ -50,8 +50,8 @@ sub Mkbootstrap {
if (@all){
open my $bs, ">", "$baseext.bs"
or die "Unable to open $baseext.bs: $!";
- print STDOUT "Writing $baseext.bs\n";
- print STDOUT " containing: @all" if $Verbose;
+ print "Writing $baseext.bs\n";
+ print " containing: @all" if $Verbose;
print $bs "# $baseext DynaLoader bootstrap file for $^O architecture.\n";
print $bs "# Do not edit this file, changes will be lost.\n";
print $bs "# This file was automatically generated by the\n";
Please sign in to comment.
Something went wrong with that request. Please try again.