From: Perl 5 Porters Date: Wed, 9 Apr 1997 00:00:00 +0000 (+0000) Subject: [inseparable changes from match from perl-5.003_97c to perl-5.003_97d] X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7a2e2cd6e4407ff4fe23355f0373307425305867;p=p5sagit%2Fp5-mst-13.2.git [inseparable changes from match from perl-5.003_97c to perl-5.003_97d] DOCUMENTATION Subject: more (err, less) doubled words Date: Fri, 11 Apr 1997 22:31:25 +0300 (EET DST) From: Jarkko Hietaniemi Files: ext/DB_File/DB_File.pm ext/DynaLoader/DynaLoader.pm ext/IO/lib/IO/Pipe.pm lib/CGI.pm lib/Exporter.pm lib/ExtUtils/MakeMaker.pm lib/IPC/Open2.pm lib/IPC/Open3.pm lib/vars.pm pod/perlcall.pod pod/perldiag.pod pod/perlfaq1.pod pod/perlfaq3.pod pod/perlfaq5.pod pod/perlfaq7.pod pod/perlfaq8.pod pod/perlipc.pod private-msgid: 199704111931.WAA24460@alpha.hut.fi LIBRARY AND EXTENSIONS Subject: win32: perl5db patch Date: Thu, 10 Apr 1997 17:42:13 -0400 From: Gurusamy Sarathy Files: lib/perl5db.pl Msg-ID: 199704102142.RAA27396@aatma.engin.umich.edu (applied based on p5p patch as commit 56cbacacb6c634a626b06407cbd555bc1519a2d5) Subject: Enhancements to debugger, Term::ReadLine, Term::Cap Date: Thu, 10 Apr 1997 15:48:07 -0400 (EDT) From: Ilya Zakharevich Files: lib/Term/Cap.pm lib/Term/ReadLine.pm lib/perl5db.pl Msg-ID: 199704101948.PAA01841@monk.mps.ohio-state.edu (applied based on p5p patch as commit 6fb2d361298c4eb5d42f1f63b0f74a60d407e546) OTHER CORE CHANGES Subject: New error msg for low-key failure of C From: Chip Salzenberg Files: pod/perldiag.pod pp_ctl.c t/pragma/strict-subs t/pragma/strict-vars --- diff --git a/Changes b/Changes index 3b3a6e5..303fe03 100644 --- a/Changes +++ b/Changes @@ -46,6 +46,141 @@ And the Keepers of the Patch Pumpkin: ------------------- + Version 5.003_97d +------------------- + +Any minute now... second public beta... no, really... + + CORE LANGUAGE CHANGES + + Title: "Fix for incorrect overloaded assignment" + From: Ilya Zakharevich + Msg-ID: <199704112225.SAA03482@monk.mps.ohio-state.edu> + Date: Fri, 11 Apr 1997 18:25:33 -0400 (EDT) + Files: gv.c + + Title: "Fix C< $x=''; pos($x)=0; $x=~/\G$/ >" + From: Chip Salzenberg + Files: pp_hot.c + + Title: "Fix label on C statement" + From: Chip Salzenberg + Files: perly.c perly.y + + CORE PORTABILITY + + Title: "update to 5.003_97b/hint/irix_6_2.sh" + From: Scott Henry + Msg-ID: + Date: 11 Apr 1997 18:05:03 -0700 + Files: hints/irix_6_2.sh + + OTHER CORE CHANGES + + Title: "Before 'BEGIN not safe', explain why" + From: Chip Salzenberg + Files: op.c + + Title: "New error msg for low-key failure of C" + From: Chip Salzenberg + Files: pod/perldiag.pod pp_ctl.c t/pragma/strict-subs + t/pragma/strict-vars + + Title: "Put "dXSUB_SYS" last in declarations" + From: Chip Salzenberg + Files: win32/perllib.c + + Title: "Minor type cleanup" + From: Chip Salzenberg + Files: proto.h toke.c + + BUILD PROCESS + + (no changes) + + LIBRARY AND EXTENSIONS + + Title: "win32: perl5db patch" + From: Gurusamy Sarathy + Msg-ID: <199704102142.RAA27396@aatma.engin.umich.edu> + Date: Thu, 10 Apr 1997 17:42:13 -0400 + Files: lib/perl5db.pl + + Title: "Enhancements to debugger, Term::ReadLine, Term::Cap" + From: Ilya Zakharevich + Msg-ID: <199704101948.PAA01841@monk.mps.ohio-state.edu> + Date: Thu, 10 Apr 1997 15:48:07 -0400 (EDT) + Files: lib/Term/Cap.pm lib/Term/ReadLine.pm lib/perl5db.pl + + Title: "MM_Unix patch for use under CVS" + From: Ulrich Pfeifer + Msg-ID: + Date: 11 Apr 1997 14:59:00 +0200 + Files: lib/ExtUtils/MM_Unix.pm + + Title: "Complex update (five patches)" + From: Jarkko Hietaniemi + Files: lib/Math/Complex.pm t/lib/complex.t + + Title: "Fix undef warning in Math::BigInt" + From: Chip Salzenberg + Files: lib/Math/BigInt.pm + + TESTS + + (no other changes) + + UTILITIES + + Title: "Add B<-o> option to a2p, for old awk; make new the default" + From: Chip Salzenberg + Files: x2p/a2p.h x2p/a2p.pod x2p/a2py.c x2p/walk.c + + DOCUMENTATION + + Title: "typo in lib/diagnostics.pm" + From: barnett@grymoire.crd.ge.com (Bruce Barnett) + Msg-ID: <199704111800.OAA27297@grymoire.crd.ge.com> + Date: Fri, 11 Apr 1997 14:00:54 -0400 + Files: lib/diagnostics.pm + + Title: "Use B<> for options in Class::Struct pod" + From: Hugo van der Sanden + Msg-ID: <334D2E7B.67F0@iii.co.uk> + Date: Thu, 10 Apr 1997 19:16:27 +0100 + Files: lib/Class/Struct.pm + + Title: "Explain //g and \G issues" + From: Gurusamy Sarathy + Msg-ID: <199704122048.QAA25060@aatma.engin.umich.edu> + Date: Sat, 12 Apr 1997 16:48:41 -0400 + Files: pod/perldelta.pod pod/perlop.pod pod/perlre.pod + + Title: "more (err, less) doubled words" + From: Jarkko Hietaniemi + Msg-ID: <199704111931.WAA24460@alpha.hut.fi> + Date: Fri, 11 Apr 1997 22:31:25 +0300 (EET DST) + Files: ext/DB_File/DB_File.pm ext/DynaLoader/DynaLoader.pm + ext/IO/lib/IO/Pipe.pm lib/CGI.pm lib/Exporter.pm + lib/ExtUtils/MakeMaker.pm lib/IPC/Open2.pm lib/IPC/Open3.pm + lib/vars.pm pod/perlcall.pod pod/perldiag.pod + pod/perlfaq1.pod pod/perlfaq3.pod pod/perlfaq5.pod + pod/perlfaq7.pod pod/perlfaq8.pod pod/perlipc.pod + + Title: "Freudian slip error in perlsub.pod" + From: barnett@grymoire.crd.ge.com (Bruce Barnett) + Msg-ID: <199704111755.NAA27200@grymoire.crd.ge.com> + Date: Fri, 11 Apr 1997 13:55:07 -0400 + Files: pod/perlsub.pod + + Title: "Little patch for perl5.003_97c/pod/perlpod.pod" + From: rse@engelschall.com (Ralf S. Engelschall) + Msg-ID: <199704112048.WAA08733@en1.engelschall.com> + Date: Fri, 11 Apr 1997 22:48:37 +0200 + Files: pod/perlpod.pod + + +------------------- Version 5.003_97c ------------------- diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm index 3b6edd4..5a88228 100644 --- a/ext/DB_File/DB_File.pm +++ b/ext/DB_File/DB_File.pm @@ -282,8 +282,6 @@ sub get_dup 1; __END__ -=cut - =head1 NAME DB_File - Perl5 access to Berkeley DB @@ -772,11 +770,11 @@ with the key, C<$key>. In list context, it returns all the values which match C<$key>. Note that the values will be returned in an apparently random order. -In list context, if the second parameter is present and evaluates TRUE, -the method returns an associative array. The keys of the associative -array correspond to the the values that matched in the BTREE and the -values of the array are a count of the number of times that particular -value occurred in the BTREE. +In list context, if the second parameter is present and evaluates +TRUE, the method returns an associative array. The keys of the +associative array correspond to the values that matched in the BTREE +and the values of the array are a count of the number of times that +particular value occurred in the BTREE. So assuming the database created above, we can use C like this: @@ -1397,7 +1395,7 @@ F). =head2 The untie() Gotcha -If you make use of the Berkeley DB API, it is is I strongly +If you make use of the Berkeley DB API, it is I strongly recommended that you read L. Even if you don't currently make use of the API interface, it is still diff --git a/ext/DynaLoader/DynaLoader.pm b/ext/DynaLoader/DynaLoader.pm index 8488144..6704310 100644 --- a/ext/DynaLoader/DynaLoader.pm +++ b/ext/DynaLoader/DynaLoader.pm @@ -393,12 +393,13 @@ used to resolve any undefined symbols that might be generated by a later call to load_file(). This is only required on some platforms which do not handle dependent -libraries automatically. For example the Socket Perl extension library -(F) contains references to many socket functions -which need to be resolved when it's loaded. Most platforms will -automatically know where to find the 'dependent' library (e.g., -F). A few platforms need to to be told the location -of the dependent library explicitly. Use @dl_resolve_using for this. +libraries automatically. For example the Socket Perl extension +library (F) contains references to many socket +functions which need to be resolved when it's loaded. Most platforms +will automatically know where to find the 'dependent' library (e.g., +F). A few platforms need to be told the +location of the dependent library explicitly. Use @dl_resolve_using +for this. Example usage: diff --git a/ext/IO/lib/IO/Pipe.pm b/ext/IO/lib/IO/Pipe.pm index 1768a4a..ae6d9a5 100644 --- a/ext/IO/lib/IO/Pipe.pm +++ b/ext/IO/lib/IO/Pipe.pm @@ -186,12 +186,12 @@ processes. =item new ( [READER, WRITER] ) -Creates a C, which is a reference to a -newly created symbol (see the C package). C -optionally takes two arguments, which should be objects blessed into -C, or a subclass thereof. These two objects will be used -for the system call to C. If no arguments are given then then -method C is called on the new C object. +Creates a C, which is a reference to a newly created symbol +(see the C package). C optionally takes two +arguments, which should be objects blessed into C, or a +subclass thereof. These two objects will be used for the system call +to C. If no arguments are given then method C is called +on the new C object. These two handles are held in the array part of the GLOB until either C or C is called. diff --git a/lib/CGI.pm b/lib/CGI.pm index 0c869d7..28fe43b 100644 --- a/lib/CGI.pm +++ b/lib/CGI.pm @@ -3143,7 +3143,7 @@ produce both the unofficial Location: header and the official URI: header. This should satisfy most servers and browsers. One hint I can offer is that relative links may not work correctly -when when you generate a redirection to another document on your site. +when you generate a redirection to another document on your site. This is due to a well-intentioned optimization that some servers use. The solution to this is to use the full URL (including the http: part) of the document you are redirecting to. @@ -3793,7 +3793,7 @@ list. Otherwise, they will be strung together on a horizontal line. =item 4. The optional fifth argument is a pointer to an associative array -relating the checkbox values to the user-visible labels that will will +relating the checkbox values to the user-visible labels that will be printed next to them (-labels). If not provided, the values will be used as the default. @@ -4390,9 +4390,9 @@ You can pass a value of 'true' to dump() in order to get it to print the results out as plain text, suitable for incorporating into a
 section.
 
-As a shortcut, as of version 1.56 you can interpolate the entire 
-CGI object into a string and it will be replaced with the
-the a nice HTML dump shown above:
+As a shortcut, as of version 1.56 you can interpolate the entire CGI
+object into a string and it will be replaced with the a nice HTML dump
+shown above:
 
     $query=new CGI;
     print "

Current Values

$query\n"; diff --git a/lib/Exporter.pm b/lib/Exporter.pm index 7b03732..66459b8 100644 --- a/lib/Exporter.pm +++ b/lib/Exporter.pm @@ -370,7 +370,7 @@ or constants that may not exist on some systems. The names of any symbols that cannot be exported should be listed in the C<@EXPORT_FAIL> array. -If a module attempts to import any of these symbols the Exporter will +If a module attempts to import any of these symbols the Exporter will give the module an opportunity to handle the situation before generating an error. The Exporter will call an export_fail method with a list of the failed symbols: diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index 273ebe7..b03ccee 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -66,7 +66,7 @@ package ExtUtils::Liblist; package ExtUtils::MakeMaker; # -# Now we can can pull in the friends +# Now we can pull in the friends # $Is_VMS = $^O eq 'VMS'; $Is_OS2 = $^O eq 'os2'; diff --git a/lib/IPC/Open2.pm b/lib/IPC/Open2.pm index f4ae748..32282d6 100644 --- a/lib/IPC/Open2.pm +++ b/lib/IPC/Open2.pm @@ -54,9 +54,9 @@ a time. Programs like B that read their entire input stream first, however, are quite apt to cause deadlock. The big problem with this approach is that if you don't have control -over source code being run in the the child process, you can't control what it does -with pipe buffering. Thus you can't just open a pipe to C and continually -read and write a line from it. +over source code being run in the child process, you can't control +what it does with pipe buffering. Thus you can't just open a pipe to +C and continually read and write a line from it. =head1 SEE ALSO diff --git a/lib/IPC/Open3.pm b/lib/IPC/Open3.pm index cfa8932..43caa03 100644 --- a/lib/IPC/Open3.pm +++ b/lib/IPC/Open3.pm @@ -57,7 +57,7 @@ time. Programs like B that read their entire input stream first, however, are quite apt to cause deadlock. The big problem with this approach is that if you don't have control -over source code being run in the the child process, you can't control +over source code being run in the child process, you can't control what it does with pipe buffering. Thus you can't just open a pipe to C and continually read and write a line from it. diff --git a/lib/Term/Cap.pm b/lib/Term/Cap.pm index 0b3b4aa..5703405 100644 --- a/lib/Term/Cap.pm +++ b/lib/Term/Cap.pm @@ -104,8 +104,11 @@ as C<$self-E{TERMCAP}>. sub termcap_path { ## private my @termcap_path; # $TERMCAP, if it's a filespec - push(@termcap_path, $ENV{TERMCAP}) if ((exists $ENV{TERMCAP}) && - ($ENV{TERMCAP} =~ /^\//)); + push(@termcap_path, $ENV{TERMCAP}) + if ((exists $ENV{TERMCAP}) && + (($^O eq 'os2' || $^O eq 'MSWin32') + ? $ENV{TERMCAP} =~ /^[a-z]:[\\\/]/i + : $ENV{TERMCAP} =~ /^\//)); if ((exists $ENV{TERMPATH}) && ($ENV{TERMPATH})) { # Add the users $TERMPATH push(@termcap_path, split(/(:|\s+)/, $ENV{TERMPATH})) diff --git a/lib/Term/ReadLine.pm b/lib/Term/ReadLine.pm index 7b735eb..a52b558 100644 --- a/lib/Term/ReadLine.pm +++ b/lib/Term/ReadLine.pm @@ -105,6 +105,15 @@ support reacher set of commands. All these commands are callable via method interface and have names which conform to standard conventions with the leading C stripped. +The stub package included with the perl distribution allows two +additional methods: C and C. The first one +makes Tk event loop run when waiting for user input (i.e., during +C method), the second one makes the command line stand out +by using termcap data. The argument to C should be 0, 1, +or a string of a form "aa,bb,cc,dd". Four components of this string +should be names of I, first two will be issued to +make the prompt standout, last two to make the input line standout. + =head1 EXPORTS None @@ -121,20 +130,22 @@ If the variable is not set, the best available package is loaded. =cut package Term::ReadLine::Stub; -@ISA = 'Term::ReadLine::Tk'; +@ISA = qw'Term::ReadLine::Tk Term::ReadLine::TermCap'; $DB::emacs = $DB::emacs; # To peacify -w +*rl_term_set = \@Term::ReadLine::TermCap::rl_term_set; sub ReadLine {'Term::ReadLine::Stub'} sub readline { my $self = shift; my ($in,$out,$str) = @$self; - print $out shift; + print $out $rl_term_set[0], shift, $rl_term_set[1], $rl_term_set[2]; $self->register_Tk if not $Term::ReadLine::registered and $Term::ReadLine::toloop and defined &Tk::DoOneEvent; #$str = scalar <$in>; $str = $self->get_line; + print $out $rl_term_set[3]; # bug in 5.000: chomping empty string creats length -1: chomp $str if defined $str; $str; @@ -200,7 +211,7 @@ sub OUT { shift->[1] } sub MinLine { undef } sub Attribs { {} } -my %features = (tkRunning => 1); +my %features = (tkRunning => 1, ornaments => 1); sub Features { \%features } package Term::ReadLine; # So late to allow the above code be defined? @@ -233,6 +244,35 @@ if (defined &Term::ReadLine::Gnu::readline) { @ISA = qw(Term::ReadLine::Stub); } +package Term::ReadLine::TermCap; + +# Prompt-start, prompt-end, command-line-start, command-line-end +# -- zero-width beautifies to emit around prompt and the command line. +@rl_term_set = ("","","",""); +# string encoded: +$rl_term_set = ',,,'; + +sub LoadTermCap { + return if defined $terminal; + + require Term::Cap; + $terminal = Tgetent Term::Cap ({OSPEED => 9600}); # Avoid warning. +} + +sub ornaments { + shift; + return $rl_term_set unless @_; + $rl_term_set = shift; + $rl_term_set ||= ',,,'; + $rl_term_set = 'us,ue,md,me' if $rl_term_set == 1; + my @ts = split /,/, $rl_term_set, 4; + eval { LoadTermCap }; + warn("Cannot find termcap: $@\n"), return unless defined $terminal; + @rl_term_set = map {$_ ? $terminal->Tputs($_,1) || '' : ''} @ts; + return $rl_term_set; +} + + package Term::ReadLine::Tk; $count_handle = $count_DoOne = $count_loop = 0; diff --git a/lib/perl5db.pl b/lib/perl5db.pl index 9718fed..d0a7125 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -2,7 +2,7 @@ package DB; # Debugger for Perl 5.00x; perl5db.pl patch level: -$VERSION = 0.9909; +$VERSION = 0.9911; $header = "perl5db.pl patch level $VERSION"; # Enhanced by ilya@math.ohio-state.edu (Ilya Zakharevich) @@ -177,7 +177,7 @@ $inhibit_exit = $option{PrintRet} = 1; compactDump veryCompact quote HighBit undefPrint globPrint PrintRet UsageOnly frame AutoTrace TTY noTTY ReadLine NonStop LineInfo maxTraceLen - recallCommand ShellBang pager tkRunning + recallCommand ShellBang pager tkRunning ornaments signalLevel warnLevel dieLevel inhibit_exit); %optionVars = ( @@ -211,6 +211,7 @@ $inhibit_exit = $option{PrintRet} = 1; warnLevel => \&warnLevel, dieLevel => \&dieLevel, tkRunning => \&tkRunning, + ornaments => \&ornaments, ); %optionRequire = ( @@ -285,7 +286,7 @@ if ($notty) { if (-e "/dev/tty") { $console = "/dev/tty"; - } elsif (-e "con") { + } elsif (-e "con" or $^O eq 'MSWin32') { $console = "con"; } else { $console = "sys\$command"; @@ -1374,6 +1375,7 @@ sub setterm { if ($term->Features->{setHistory} and "@hist" ne "?") { $term->SetHistory(@hist); } + ornaments($ornaments) if defined $ornaments; } sub readline { @@ -1563,6 +1565,16 @@ sub shellBang { $psh; } +sub ornaments { + if (defined $term) { + local ($warnLevel,$dieLevel) = (0, 1); + return '' unless $term->Features->{ornaments}; + eval { $term->ornaments(@_) } || ''; + } else { + $ornaments = shift; + } +} + sub recallCommand { if (@_) { $rc = quotemeta shift; @@ -1679,6 +1691,7 @@ O [opt[=val]] [opt\"val\"] [opt?]... frame affects printing messages on entry and exit from subroutines. AutoTrace affects printing messages on every possible breaking point. maxTraceLen gives maximal length of evals/args listed in stack trace. + ornaments affects screen appearance of the command line. During startup options are initialized from \$ENV{PERLDB_OPTS}. You can put additional initialization options TTY, noTTY, ReadLine, and NonStop there. diff --git a/lib/vars.pm b/lib/vars.pm index 0b7dacc..e007baa 100644 --- a/lib/vars.pm +++ b/lib/vars.pm @@ -19,12 +19,13 @@ C declarations are not BLOCK-scoped. They are thus effective for the entire file in which they appear. You may not rescind such declarations with C or C. -Packages such as the B and B that delay loading -of subroutines within packages can create problems with package lexicals -defined using C. While the B pragma cannot duplicate the -effect of package lexicals (total transparency outside of the package), -it can act as an acceptable substitute by pre-declaring global symbols, -ensuring their availability to to the later-loaded routines. +Packages such as the B and B that delay +loading of subroutines within packages can create problems with +package lexicals defined using C. While the B pragma +cannot duplicate the effect of package lexicals (total transparency +outside of the package), it can act as an acceptable substitute by +pre-declaring global symbols, ensuring their availability to the +later-loaded routines. See L. diff --git a/patchlevel.h b/patchlevel.h index 32c4800..8002c93 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -41,6 +41,7 @@ static char *local_patches[] = { ,"Dev97A - First development patch to 5.003_97" ,"Dev97B - Second development patch to 5.003_97" ,"Dev97C - Third development patch to 5.003_97" + ,"Dev97D - Fourth development patch to 5.003_97" ,NULL }; diff --git a/pod/perlcall.pod b/pod/perlcall.pod index 85e0237..5a689d0 100644 --- a/pod/perlcall.pod +++ b/pod/perlcall.pod @@ -356,7 +356,7 @@ As mentioned above, you can determine the context of the currently executing subroutine in Perl with I. The equivalent test can be made in C by using the C macro, which returns C if you have been called in an array context, C if -in a a scalar context, or C if in a void context (i.e. the +in a scalar context, or C if in a void context (i.e. the return value will not be used). An older version of this macro is called C; in a void context it returns C instead of C. An example of using the C macro is shown in diff --git a/pod/perldiag.pod b/pod/perldiag.pod index cdc7c59..080c2a7 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -613,7 +613,7 @@ package name. =item Can't locate %s in @INC -(F) You said to do (or require, or use) a file that couldn't be found in +(F) You said to do (or require, or use) a file that couldn't be found in any of the libraries mentioned in @INC. Perhaps you need to set the PERL5LIB or PERL5OPT environment variable to say where the extra library is, or maybe the script needs to add the library name to @INC. Or maybe @@ -842,6 +842,12 @@ to 01411. Octal constants are introduced with a leading 0 in Perl, as in C. (W) You tried to close a filehandle that was never opened. +=item Compilation failed in require + +(F) Perl could not compile a file specified in a C statement. +Perl uses this generic message when none of the errors that it encountered +were severe enough to halt compilation immediately. + =item connect() on closed fd (W) You tried to do a connect on a closed socket. Did you forget to check diff --git a/pod/perlfaq1.pod b/pod/perlfaq1.pod index 5d45c81..99d4b35 100644 --- a/pod/perlfaq1.pod +++ b/pod/perlfaq1.pod @@ -187,7 +187,7 @@ ok, while "awk and Perl" and "Python and perl" do not. It doesn't matter. In "standard terminology" a I has been compiled to physical -machine code once, and can then be be run multiple times, whereas a +machine code once, and can then be run multiple times, whereas a I