From: Jarkko Hietaniemi Date: Thu, 1 Feb 2001 22:15:29 +0000 (+0000) Subject: Integrate changes #8641,8644,8649,8654,8662,8663,8664,8665,8667,8669 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ac634a9a38fe527f538270bb24c9a19cd88f5947;p=p5sagit%2Fp5-mst-13.2.git Integrate changes #8641,8644,8649,8654,8662,8663,8664,8665,8667,8669 from maintperl. Upgrade to Getopt::Long 2.25, from Johan Vromans. more files need to be writable in the source distribution perl_clone() wants to clone PL_numeric_radix_sv (fix for change#8626) Solaris 2.7 i386 #defines SP in /usr/include/sys/reg.h Subject: Re: [PATCH perl5.6.1-TRIAL2] long C<=item>s in perlmodlib.pod Allow the float to be fuzzier. need to use INT2PTR instead of a straight cast or ia64 fails Subject: Re: [ID 20010201.006] bad pointer from perlfunc to perlmod add ppaddr as one of the compatibility symbols under -DPERL_POLLUTE p4raw-link: @8662 on //depot/maint-5.6/perl: 4fd7b88664e5220d434e86a4171b6501199a0df5 p4raw-link: @8654 on //depot/maint-5.6/perl: 570327f99599d50e7689d7f8e58ce0062abb9bfd p4raw-link: @8649 on //depot/maint-5.6/perl: e077e268546d6372b301e6674cc72c8d19727a93 p4raw-link: @8644 on //depot/maint-5.6/perl: 0a4931cb101d4c4c7af706ed2960bc1b4935992e p4raw-link: @8641 on //depot/maint-5.6/perl: c266a57ee93b609f48ccb9173c2a3073a28cd0db p4raw-link: @8626 on //depot/maint-5.6/perl: e77a7f40d76565c12d43428402884505d5496c8f p4raw-id: //depot/perl@8670 p4raw-integrated: from //depot/maint-5.6/perl@8650 'copy in' Porting/makerel (@7298..) lib/Getopt/Long.pm (@7895..) pod/perlmodlib.PL (@8175..) 'ignore' pod/perlmodlib.pod (@8640..) 'merge in' t/lib/peek.t (@8151..) ext/POSIX/POSIX.xs (@8177..) embed.pl pp.h (@8620..) embedvar.h (@8626..) pod/perlfunc.pod (@8630..) p4raw-integrated: from //depot/maint-5.6/perl@8649 'merge in' sv.c (@8634..) --- diff --git a/Porting/makerel b/Porting/makerel index 8341690..138fffa 100644 --- a/Porting/makerel +++ b/Porting/makerel @@ -102,20 +102,31 @@ my @exe = qw( system("chmod +x @exe"); my @writables = qw( + keywords.h + opcode.h + opnames.h + pp_proto.h + pp.sym + proto.h embed.h embedvar.h - ext/B/B/Asmdata.pm - ext/ByteLoader/byterun.c - ext/ByteLoader/byterun.h global.sym - keywords.h - lib/warnings.pm + pod/perlintern.pod + pod/perlapi.pod objXSUB.h - opcode.h - pp.sym - pp_proto.h + perlapi.h + perlapi.c + ext/ByteLoader/byterun.h + ext/ByteLoader/byterun.c + ext/B/B/Asmdata.pm regnodes.h warnings.h + lib/warnings.pm + vms/perly_c.vms + vms/perly_h.vms + win32/Makefile + win32/makefile.mk + win32/config_H.bc win32/config_H.bc win32/config_H.gc win32/config_H.vc diff --git a/embed.pl b/embed.pl index 9732773..1b8b7b0 100755 --- a/embed.pl +++ b/embed.pl @@ -198,6 +198,7 @@ my @extvars = qw(sv_undef sv_yes sv_no na dowarn diehook dirty perl_destruct_level + ppaddr ); sub readsyms (\%$) { diff --git a/embedvar.h b/embedvar.h index 205004c..8244ccc 100644 --- a/embedvar.h +++ b/embedvar.h @@ -1747,6 +1747,7 @@ #define no_modify PL_no_modify #define perl_destruct_level PL_perl_destruct_level #define perldb PL_perldb +#define ppaddr PL_ppaddr #define rsfp PL_rsfp #define rsfp_filters PL_rsfp_filters #define stack_base PL_stack_base diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 887fcbc..a81f044 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -3417,9 +3417,8 @@ sigaction(sig, action, oldaction = 0) /* Set up any desired mask. */ svp = hv_fetch(action, "MASK", 4, FALSE); if (svp && sv_isa(*svp, "POSIX::SigSet")) { - unsigned long tmp; - tmp = (unsigned long)SvNV((SV*)SvRV(*svp)); - sigset = (sigset_t*) tmp; + IV tmp = SvIV((SV*)SvRV(*svp)); + sigset = INT2PTR(sigset_t*, tmp); act.sa_mask = *sigset; } else diff --git a/lib/Getopt/Long.pm b/lib/Getopt/Long.pm index e933c48..472527d 100644 --- a/lib/Getopt/Long.pm +++ b/lib/Getopt/Long.pm @@ -2,7 +2,7 @@ package Getopt::Long; -# RCS Status : $Id: GetoptLong.pl,v 2.25 2000-08-28 21:45:17+02 jv Exp jv $ +# RCS Status : $Id: GetoptLong.pl,v 2.26 2001-01-31 10:20:29+01 jv Exp $ # Author : Johan Vromans # Created On : Tue Sep 11 15:00:12 1990 # Last Modified By: Johan Vromans @@ -35,8 +35,8 @@ use 5.004; use strict; use vars qw($VERSION $VERSION_STRING); -$VERSION = 2.24_02; -$VERSION_STRING = "2.24_02"; +$VERSION = 2.25; +$VERSION_STRING = "2.25"; use Exporter; use AutoLoader qw(AUTOLOAD); @@ -215,7 +215,7 @@ __END__ ################ AutoLoading subroutines ################ -# RCS Status : $Id: GetoptLongAl.pl,v 2.29 2000-08-28 21:56:18+02 jv Exp jv $ +# RCS Status : $Id: GetoptLongAl.pl,v 2.30 2001-01-31 10:21:11+01 jv Exp $ # Author : Johan Vromans # Created On : Fri Mar 27 11:50:30 1998 # Last Modified By: Johan Vromans @@ -244,7 +244,7 @@ sub GetOptions { print STDERR ("GetOpt::Long $Getopt::Long::VERSION ", "called from package \"$pkg\".", "\n ", - 'GetOptionsAl $Revision: 2.29 $ ', + 'GetOptionsAl $Revision: 2.30 $ ', "\n ", "ARGV: (@ARGV)", "\n ", @@ -1694,6 +1694,10 @@ is equivalent to --foo -- arg1 --bar arg2 arg3 +If C is also enabled, options processing will terminate +at the first unrecognized option, or non-option, whichever comes +first. + =item bundling (default: disabled) Enabling this option will allow single-character options to be bundled. @@ -1735,7 +1739,9 @@ errors. This makes it possible to write wrapper scripts that process only part of the user supplied command line arguments, and pass the remaining options to some other program. -This can be very confusing, especially when C is also enabled. +If C is enabled, options processing will terminate at +the first unrecognized option, or non-option, whichever comes first. +However, if C is enabled instead, results can become confusing. =item prefix @@ -1880,6 +1886,5 @@ MA 02139, USA. =cut # Local Variables: -# mode: perl # eval: (load-file "pod.el") # End: diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 0d620d9..ca14939 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -5524,7 +5524,7 @@ by C, i.e., it calls C instead of C. If no C method can be found the call fails with a fatal error. -See L for a list of standard modules and pragmas. See L +See L for a list of standard modules and pragmas. See L for the C<-M> and C<-m> command-line options to perl that give C functionality from the command-line. diff --git a/pod/perlmodlib.PL b/pod/perlmodlib.PL index c47affc..a2069da 100644 --- a/pod/perlmodlib.PL +++ b/pod/perlmodlib.PL @@ -157,66 +157,87 @@ modules are: =over =item * + Language Extensions and Documentation Tools =item * + Development Support =item * + Operating System Interfaces =item * + Networking, Device Control (modems) and InterProcess Communication =item * + Data Types and Data Type Utilities =item * + Database Interfaces =item * + User Interfaces =item * + Interfaces to / Emulations of Other Programming Languages =item * + File Names, File Systems and File Locking (see also File Handles) =item * + String Processing, Language Text Processing, Parsing, and Searching =item * + Option, Argument, Parameter, and Configuration File Processing =item * + Internationalization and Locale =item * + Authentication, Security, and Encryption =item * + World Wide Web, HTML, HTTP, CGI, MIME =item * + Server and Daemon Utilities =item * + Archiving and Compression =item * + Images, Pixmap and Bitmap Manipulation, Drawing, and Graphing =item * + Mail and Usenet News =item * + Control Flow Utilities (callbacks and exceptions etc) =item * + File Handle and Input/Output Stream Utilities =item * + Miscellaneous Modules =back @@ -421,7 +442,9 @@ the AUTOLOAD mechanism. =over 4 -=item Do similar modules already exist in some form? +=item * + +Do similar modules already exist in some form? If so, please try to reuse the existing modules either in whole or by inheriting useful features into a new class. If this is not @@ -435,7 +458,9 @@ modules, please coordinate with the author of the package. It helps if you follow the same naming scheme and module interaction scheme as the original author. -=item Try to design the new module to be easy to extend and reuse. +=item * + +Try to design the new module to be easy to extend and reuse. Try to C (or C). Remember that you can add C to individual blocks @@ -500,7 +525,9 @@ Follow the guidelines in the perlstyle(1) manual. Always use B<-w>. -=item Some simple style guidelines +=item * + +Some simple style guidelines The perlstyle manual supplied with Perl has many helpful points. @@ -532,7 +559,9 @@ e.g., C<< $obj->as_string() >>. You can use a leading underscore to indicate that a variable or function should not be used outside the package that defined it. -=item Select what to export. +=item * + +Select what to export. Do NOT export method names! @@ -556,7 +585,9 @@ As a general rule, if the module is trying to be object oriented then export nothing. If it's just a collection of functions then @EXPORT_OK anything but use @EXPORT with caution. -=item Select a name for the module. +=item * + +Select a name for the module. This name should be as descriptive, accurate, and complete as possible. Avoid any risk of ambiguity. Always try to use two or @@ -590,7 +621,9 @@ To be portable each component of a module name should be limited to 11 characters. If it might be used on MS-DOS then try to ensure each is unique in the first 8 characters. Nested modules make this easier. -=item Have you got it right? +=item * + +Have you got it right? How do you know that you've made the right decisions? Have you picked an interface design that will cause problems later? Have @@ -609,7 +642,9 @@ Don't worry about posting if you can't say when the module will be ready - just say so in the message. It might be worth inviting others to help you, they may be able to complete it for you! -=item README and other Additional Files. +=item * + +README and other Additional Files. It's well known that software developers usually fully document the software they write. If, however, the world is in urgent need of @@ -619,24 +654,31 @@ documentation please at least provide a README file containing: =over 10 =item * + A description of the module/package/extension etc. =item * + A copyright notice - see below. =item * + Prerequisites - what else you may need to have. =item * + How to build it - possible changes to Makefile.PL etc. =item * + How to install it. =item * + Recent changes in this release, especially incompatibilities =item * + Changes / enhancements you plan to make in the future. =back @@ -649,6 +691,7 @@ Copying, ToDo etc. =item Adding a Copyright Notice. + How you choose to license your work is a personal decision. The general mechanism is to assert your Copyright and then make a declaration of how others may copy/use/modify your work. @@ -668,7 +711,9 @@ This statement should at least appear in the README file. You may also wish to include it in a Copying file and your source files. Remember to include the other words in addition to the Copyright. -=item Give the module a version/issue/release number. +=item * + +Give the module a version/issue/release number. To be fully compatible with the Exporter and MakeMaker modules you should store your module's version number in a non-my package @@ -682,7 +727,9 @@ Use the number in announcements and archive file names when releasing the module (ModuleName-1.02.tar.Z). See perldoc ExtUtils::MakeMaker.pm for details. -=item How to release and distribute a module. +=item * + +How to release and distribute a module. It's good idea to post an announcement of the availability of your module (or the module itself if small) to the comp.lang.perl.announce @@ -721,7 +768,9 @@ CPAN! Please remember to send me an updated entry for the Module list! -=item Take care when changing a released module. +=item * + +Take care when changing a released module. Always strive to remain compatible with previous released versions. Otherwise try to add a mechanism to revert to the @@ -735,26 +784,34 @@ old behavior if people rely on it. Document incompatible changes. =over 4 -=item There is no requirement to convert anything. +=item * + +There is no requirement to convert anything. If it ain't broke, don't fix it! Perl 4 library scripts should continue to work with no problems. You may need to make some minor changes (like escaping non-array @'s in double quoted strings) but there is no need to convert a .pl file into a Module for just that. -=item Consider the implications. +=item * + +Consider the implications. All Perl applications that make use of the script will need to be changed (slightly) if the script is converted into a module. Is it worth it unless you plan to make other changes at the same time? -=item Make the most of the opportunity. +=item * + +Make the most of the opportunity. If you are going to convert the script to a module you can use the opportunity to redesign the interface. The guidelines for module creation above include many of the issues you should consider. -=item The pl2pm utility will get you started. +=item * + +The pl2pm utility will get you started. This utility will read *.pl files (given as parameters) and write corresponding *.pm files. The pl2pm utilities does the following: @@ -762,15 +819,19 @@ corresponding *.pm files. The pl2pm utilities does the following: =over 10 =item * + Adds the standard Module prologue lines =item * + Converts package specifiers from ' to :: =item * + Converts die(...) to croak(...) =item * + Several other minor changes =back @@ -785,18 +846,28 @@ Don't delete the original .pl file till the new .pm one works! =over 4 -=item Complete applications rarely belong in the Perl Module Library. +=item * + +Complete applications rarely belong in the Perl Module Library. + +=item * -=item Many applications contain some Perl code that could be reused. +Many applications contain some Perl code that could be reused. Help save the world! Share your code in a form that makes it easy to reuse. -=item Break-out the reusable code into one or more separate module files. +=item * + +Break-out the reusable code into one or more separate module files. + +=item * + +Take the opportunity to reconsider and redesign the interfaces. -=item Take the opportunity to reconsider and redesign the interfaces. +=item * -=item In some cases the 'application' can then be reduced to a small +In some cases the 'application' can then be reduced to a small fragment of code built on top of the reusable modules. In these cases the application could invoked as: diff --git a/pp.h b/pp.h index 674f6c6..d58d187 100644 --- a/pp.h +++ b/pp.h @@ -55,6 +55,7 @@ Refetch the stack pointer. Used after a callback. See L. =cut */ +#undef SP /* Solaris 2.7 i386 has this in /usr/include/sys/reg.h */ #define SP sp #define MARK mark #define TARG targ diff --git a/sv.c b/sv.c index 7d6f110..31a90e7 100644 --- a/sv.c +++ b/sv.c @@ -8846,7 +8846,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_numeric_name = SAVEPV(proto_perl->Inumeric_name); PL_numeric_standard = proto_perl->Inumeric_standard; PL_numeric_local = proto_perl->Inumeric_local; - PL_numeric_radix = proto_perl->Inumeric_radix; + PL_numeric_radix = sv_dup_inc(proto_perl->Inumeric_radix); #endif /* !USE_LOCALE_NUMERIC */ /* utf8 character classes */ diff --git a/t/lib/peek.t b/t/lib/peek.t index 288d3bd..7bf1793 100644 --- a/t/lib/peek.t +++ b/t/lib/peek.t @@ -101,7 +101,7 @@ do_test( 7, REFCNT = 1 FLAGS = \\(NOK,pNOK\\) IV = 0 - NV = 789\\.1 + NV = 789\\.(?:1(?:000+\d+)?|0999+\d+) PV = $ADDR "789"\\\0 CUR = 3 LEN = 4');