Re: kill mv-if-diff?
On 9/24/05, Nicholas Clark [EMAIL PROTECTED] wrote: I also observe that sometimes when I edit files and rebuild, later files needlessly get rebuilt, probably because make thinks something is out of date, something that never gets updated, probably because it's not being I don't get your reasoning here... touched, due to mv-if-diff, and there are non-file targets in the dependency tree. Anyway, I've never looked at this that much, but if someone can figure out solutions to things getting run too many times, good :) (that could be added in perltodo as well)
Re: kill mv-if-diff?
On 9/24/05, Nicholas Clark [EMAIL PROTECTED] wrote: IIRC the following happens: I edit (say) sv.c I run make make reasons that a lot of things are out of date. Specifically, 1: all the Unicode tables are out of date with respect to lib/Config.pm 2: because that in turn is out of date w.r.t. miniperl ah yes. 3: because that is out of date w.r.t. sv.o 4: because that is out of date w.r.t. sv.c So the make reruns the build steps for 4,3,2,1 Only mv-if-diff kicks in, and lib/Config.pm isn't changed Ok. Given that nothing prevents people from running make perl directly if they don't want to rebuild tables, maybe we can simplify mv-if-diff out.
Re: [PATCH] Changes for hints/linux.sh for Purify
Steve Peters wrote: Purify's ld is much more picky regarding duplicate symbols than the GNU ld. It automatically includes libc by default. Configure, however, includes a -lc when linking, causing the link to fail. The following patch deals with the duplicate symbols by removing libc from the libraries that Configure will probe for when it is run with a -DPURIFY argument. Thanks, applied as #25582.
Re: [PATCH] quiet a few warnings
Yitzchak Scott-Thoennes wrote: --- perl/embed.fnc.orig 2005-09-19 12:16:55.0 -0700 +++ perl/embed.fnc2005-09-21 13:05:46.76224 -0700 Thanks, applied as change #25586.
Re: Too late for INIT
[EMAIL PROTECTED] wrote: If I correctly read this message from Larry: http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-04/msg00081.html we shouldn't be refusing to run INIT blocks just because a module was loaded with 'require', or because a string was eval()ed. That was the most recent discussion of the issue I could find: have I missed a later refutation? If not, is this still desirable? The current behaviour seems like an odd wart that substantially limits the usefulness of INIT blocks. I'm not sure whether an analogous fix is required for CHECK blocks, or what the impact of either change might be. The CHECK blocks behaviour cannot be changed for compatibility reasons (and because O.pm relies on them.) That is, they're run at the end of the compilation of the main compilation unit, and that's all. The INIT blocks are strictly symmetrical to the CHECK blocks. I'm not sure if anything currently relies on the not-so-intuitive behaviour of init blocks. I used to add this in perltodo : =head2 UNITCHECK Introduce a new special block, UNITCHECK, which is run at the end of a compilation unit (module, file, eval(STRING) block). This will correspond to the Perl 6 CHECK. Perl 5's CHECK cannot be changed or removed because the O.pm/B.pm backend framework depends on it. That's not exactly the same thing as Larry's proposal on the mail you linked to. -- A system is nothing more than the subordination of all aspects of the universe to any one such aspect. -- Borges
Re: pod/pod2usage2.t
H.Merijn Brand wrote: On Thu, 22 Sep 2005 10:45:20 +0100, Nicholas Clark [EMAIL PROTECTED] wrote: On Thu, Sep 22, 2005 at 11:43:44AM +0200, H.Merijn Brand wrote: On Thu, 22 Sep 2005 10:27:30 +0200, H.Merijn Brand [EMAIL PROTECTED] wrote: make test_harness succeeds, make test fails. Completely rewritten test attached 1. Move to Test::More and add comments to tests 2. Split the combined ok ()'s to one is (), and one ok () each 3. The printing is all done with leading '#' to not confuse TEST 4. That also makes the returned expected output read better IMHO Feel free to change again Thanks, applied as #25588 http://public.activestate.com/cgi-bin/perlbrowse?patch=25588 Marek, I'm cc:ing you for you to get (and review) that new test file.
Re: [PATCH] Fix to PERL_DEBUG_COW
On 9/23/05, Steve Peters [EMAIL PROTECTED] wrote: Change #25571 has caused the smokes to be broken when building with -DPERL_DEBUG_COW. The following patch fixes the builds. Thanks, applied as change #25590. --- sv.h.old2005-09-22 10:02:52.0 -0500 +++ sv.h2005-09-23 13:05:24.0 -0500
Re: [PATCH] Compress::Zlib 1.40
On 9/23/05, Paul Marquess [EMAIL PROTECTED] wrote: Sync core with CPAN Thanks, applied as change #25591.
Re: [PATCH 5.8.7] misc a2p fixes
Brendan O'Dea wrote: The following patch corrects some issues with a2p: * Make {$1++;print} work correctly. The re-join was occuring for assignment, but not increment (Debian bug #198945). * Make {$NF++} work. Was generating $Fld[$#Fld++]. * Use -1 as the last argument to split (cosmetic, bug #18395). * Omit last argument to substr (cosmetic). --bod, wondering if anyone actually uses a2p anymore. Thanks, applied as change #25534 to bleadperl.
Re: [perl #37223] File::Find::find fails on Win32 with follow = 1
Steve Hay (via RT) wrote: The File::Find::find() function fails on Win32 if the follow = 1 option is specified. Presumably follow (and follow_fast?) should be no-ops on Win32 since symbolic links are not supported on that OS. Seems quite sensible. Is this a new problem ? I can't believe nobody noticed it until now...
Re: Signature.t failure
H.Merijn Brand wrote: Because I installed Test::Pod and Test::Pod::Coverage (requiring a whole chain of other modules) and Devel::Cover, I also had to install Module::Signature somewhere along the line, and this causes the 5.8.8 tests to fail. After reading Module::Signature's docs, I propose the following patch to blead (and maint): blead hasn't signature.t. I removed it, due to the lack of Module::Signature. Moreover, the SIGNATURE file is actually there, in lib/CPAN, but not found because the tests are run from t/. Failed Test Stat Wstat Total Fail Failed List of Failed --- ../lib/CPAN/t/signature.t11 100.00% 1 53 tests and 207 subtests skipped. Failed 1/971 test scripts, 99.90% okay. 1/101205 subtests failed, 100.00% okay. lt09:/pro/3gl/CPAN/perl-5.8.x-dor 108 diff -pu lib/CPAN/t/signature.t{,.new} --- lib/CPAN/t/signature.t 2003-07-31 22:56:23.0 +0200 +++ lib/CPAN/t/signature.t.new 2005-09-20 09:35:08.0 +0200 @@ -3,7 +3,10 @@ use strict; print 1..1\n; -if (!eval { require Module::Signature; 1 }) { +if (!-s 'SIGNATURE') { + print ok 1 # skip - No signature file found\n; +} +elsif (!eval { require Module::Signature; 1 }) { print ok 1 # skip - no Module::Signature found\n; } elsif (!eval { require Socket; Socket::inet_aton('pgp.mit.edu') }) { Exit 1 lt09:/pro/3gl/CPAN/perl-5.8.x-dor 109
Re: PATCH for #37138: using XSUB as DB::DB causes perl to crash
Salvador FandiXo wrote: the attached patch solves bug #37138, that was causing perl to crash when using an XSUB as DB::DB(). Thanks. Your patch is suitable for maintperl; I modified it as follows for bleadperl : Change 25511 by [EMAIL PROTECTED] on 2005/09/20 09:02:17 Subject: PATCH for #37138: using XSUB as DB::DB causes perl to crash From: Salvador FandiXo [EMAIL PROTECTED] Date: Mon, 19 Sep 2005 06:56:39 -0700 (PDT) Message-ID: [EMAIL PROTECTED] (adapted to bleadperl) Affected files ... ... //depot/perl/pp_ctl.c#479 edit Differences ... //depot/perl/pp_ctl.c#479 (text) @@ -1771,13 +1771,24 @@ hasargs = 0; SPAGAIN; - PUSHBLOCK(cx, CXt_SUB, SP); - PUSHSUB_DB(cx); - cx-blk_sub.retop = PL_op-op_next; - CvDEPTH(cv)++; - SAVECOMPPAD(); - PAD_SET_CUR_NOSAVE(CvPADLIST(cv), 1); - RETURNOP(CvSTART(cv)); + if (CvXSUB(cv)) { + CvDEPTH(cv)++; + PUSHMARK(SP); + (void)(*CvXSUB(cv))(aTHX_ cv); + CvDEPTH(cv)--; + FREETMPS; + LEAVE; + return NORMAL; + } + else { + PUSHBLOCK(cx, CXt_SUB, SP); + PUSHSUB_DB(cx); + cx-blk_sub.retop = PL_op-op_next; + CvDEPTH(cv)++; + SAVECOMPPAD(); + PAD_SET_CUR_NOSAVE(CvPADLIST(cv), 1); + RETURNOP(CvSTART(cv)); + } } else return NORMAL;
Re: [PATCH blead] Re: [perl #36733] %SIG not properly local-ized
Rick Delaney wrote: This is a bug report for perl from [EMAIL PROTECTED], generated with the help of perlbug 1.35 running under perl v5.8.6. - The construct local %SIG = %SIG; does *not* make an exact local copy of %SIG, as it should. Please look at the following patch. I really don't understand what needs_store is for but keeping it TRUE for %SIG seems to fix this. Anyway, the tests should be good. Thanks, applied as #25515 (although I made the hv.c chunk a bit nicer.)
Re: oddity in op.c
On 9/20/05, David Nicol [EMAIL PROTECTED] wrote: what's OP_DOR? //
Re: [PATCH] licensing terms for perlglossary.pod
On 9/20/05, Yitzchak Scott-Thoennes [EMAIL PROTECTED] wrote: Tim O'Reilly says we can say: Woot. Where ? --- perl/pod/perlglossary.pod.orig 2005-09-20 11:22:31.480172800 -0700 +++ perl/pod/perlglossary.pod 2005-09-20 11:24:18.453993600 -0700 @@ -3380,4 +3380,4 @@ Based on the Glossary of Programming Perl, Third Edition, by Larry Wall, Tom Christiansen Jon Orwant. Copyright (c) 2000, 1996, 1991 O'Reilly Media, Inc. -Used with permission. +This document may be distributed under the same terms as Perl itself.
Re: oddity in op.c
On 9/20/05, David Nicol [EMAIL PROTECTED] wrote: what's OP_DOR? // Now that defined-or has an opcode, is if(defined(EXPR)){... optimized to use it instead of calling OP_DEFINED? you mean unless(defined(EXPR)) surely... No, it's not, currently.
Re: [PATCH] licensing terms for perlglossary.pod
On 9/20/05, Yitzchak Scott-Thoennes [EMAIL PROTECTED] wrote: Tim O'Reilly says we can say: Woot. Where ? See attached. --- perl/pod/perlglossary.pod.orig 2005-09-20 11:22:31.480172800 -0700 +++ perl/pod/perlglossary.pod 2005-09-20 11:24:18.453993600 -0700 So, thanks, applied as change #25523 to bleadperl. (I'm quite happy about this, even if this means one less interesting flamewar on debian-legal :)
Re: [perl #37190] -DT -e 'use warnings;' crashes
Nicholas Clark (via RT) wrote: Using -DT with use warnings; goes bang on OS X. I was able to get out of memory failures on FreeBSD, but everything works on x86/Linux, at least for me. I guess x86/Linux is just lucky - this seems to be a real bug, although quite where, I'm not sure. Starting gdb as gdb --args ./perl -Ilib -DT -e 'use warnings;' and running the program gives: Moreover, this makes valgrind crash, giving this warning before hanging and eating all CPU : ==13290== Warning: set address range perms: large range 171544052, a 0, v 1
Re: [perl #37102] Additional information
On 9/18/05, Geoff Mottram [EMAIL PROTECTED] wrote: The problem with regular expressions getting clobbered only occurs while running Perl with the -d (debug) option. I believe it is the sub() method of the DB.pm module that contains the regular expression that clobbers the running script's regular expression as described in my bug report. That's probable. In this case, other Devel:: modules might be affected if they use regular expressions this way. The proper fix would be somehow (hand waving follows) to save and restore the regexp context when entering a DB:: routine.
Re: t/io/fs.t triply linked issue - Test does not match comments
On 9/19/05, John E. Malmberg [EMAIL PROTECTED] wrote: When I enable hard links on VMS, it exposed that the t/io/fs.t is not testing what the comments indicate that it is testing. The correct test would be to see if the $mode of the third link matched the $mode for the original file. What the test is actually doing is testing to see if the umask function is behaving according to the UNIX definition. With VMS, setting the umask and related behaviors into the UNIX mode is not the default behavior. I need to make a change in this routine to get it to pass on VMS when hard links support is built in to Perl, it is skipped otherwise. One option is to fix the test to actually test what it claims to be testing. This could affect other platforms, but really should not. I'd like to have a patch for that. Now should the test be testing for a UNIX compliant umask()? And since VMS by default is not set to UNIX compliant, it would need to know when that pass would be expected to pass, or to when to put VMS into that mode. And, moreover, and optionnally, we could add a new test for testing umask() (there's no such test, at a first glance.) But of course it would make sense to skip it on non-UNIX platforms, including VMS.
Re: bleadperl DProf.xs:140: warning: `unused' attribute ignored
Yitzchak Scott-Thoennes wrote: bleadperl is getting: DProf.xs:140: warning: `unused' attribute ignored The following fixes it; I thought about defining a pTHX_bare in perl.h that leaves off the register and PERL_UNUSED_DECL from pTHX, but decided there really wasn't going to be a lot of other demand for it. The aTHX would have worked as is, but I thought it better to make both mentions just my_perl. --- p/ext/Devel/DProf/DProf.xs.orig 2005-07-08 10:03:01.0 -0700 +++ p/ext/Devel/DProf/DProf.xs 2005-09-18 18:13:43.028478400 -0700 Thanks, applied as change #25486.
Re: RFC - VMS behavior changes proposal
On 9/18/05, John E. Malmberg [EMAIL PROTECTED] wrote: I am looking for comments on a couple of VMS specific behavior issues. Unless there are some objections, I would like to make these changes: They all seem sensible to me. (Although I don't understand the 2nd very well, but I trust the experts:) 1. Fix usage of HOME and a few other environment variables used inside of the Perl binary. Perl is assuming that the HOME and possibly some other environment variables are always in UNIX format early in the startup of the interpreter. When the CRTL is in UNIX mode, then this works, in the CRTL default mode the resulting file is an illegal filename from the combination of a VMS device and directory concatenated to a UNIX path or file. This is apparently stored and then used every time that Perl needs to look up certain types of files. I would like to make the change so that in the startup, environment variables like HOME that Perl expects to be in UNIX format are in UNIX format as I find them. These tend to get exposed while I am debugging other issue. 2. If the VMS process parse style is set to extended, then Perl will default to having the C features for EFS character sets and case preserved behavior enabled, once those modes are working. 3. If a way can be found to detect that Perl is running under the GNV bash shell in the LIB$INITIALIZE section, which means %ENV{SHELL} = bash, for Perl to default for the CRTL running UNIX filename report mode. And eventually assume that the GNV bash shell will be handling spawned commands. -John [EMAIL PROTECTED] Personal Opinion Only
Re: Smoke [5.9.3] 25417 FAIL(F) freebsd 5.4-STABLE (i386/6 cpu)
I think we had said we could always keep useperlio for blead smokes. [EMAIL PROTECTED] wrote: Automated smoke report for 5.9.3 patch 25417 profane.mongueurs.net: Intel Pentium III Xeon (i386/6 cpu) onfreebsd - 5.4-STABLE using cc version 3.4.2 [FreeBSD] 20040728 smoketime 5 hours 19 minutes (average 31 minutes 56 seconds) Summary: FAIL(F) O = OK F = Failure(s), extended report at the bottom X = Failure(s) under TEST but not under harness ? = still running or test results not (yet) available Build failures during: - = unknown or N/A c = Configure, m = make, M = make (after miniperl), t = make test-prep 25417 Configuration (common) none --- - F - F - -Uuseperlio O O O O O O O O -Duse64bitint O O O O -Duseithreads O O O O -Duseithreads -Duse64bitint | | | +- PERLIO = perlio -DDEBUGGING | | +--- PERLIO = stdio -DDEBUGGING | +- PERLIO = perlio +--- PERLIO = stdio Failures: [stdio] -Uuseperlio [stdio] -DDEBUGGING -Uuseperlio ../ext/B/t/concise-xs.t.FAILED 3-779 ../ext/B/t/concise.tFAILED 145-149 ../ext/IO/t/io_sock.t...FAILED 18-26 -- Report by Test::Smoke v1.19#716 running on perl 5.8.7 (Reporter v0.016 / Smoker v0.015)
Re: [Fwd: CPAN Upload: J/JP/JPEACOCK/version-0.48.tar.gz]
John Peacock wrote: The uploaded file version-0.48.tar.gz has entered CPAN as file: $CPAN/authors/id/J/JP/JPEACOCK/version-0.48.tar.gz size: 31278 bytes md5: 95cc7fc1e72ac3c51b062d3d19cd3d79 Associated patch vs. bleadperl attached. The patch is a lot longer than the number of changes would suggest: Unfortunately : lib/version...Undefined subroutine main::qv called at ../lib/version.t line 234. # Looks like you planned 200 tests but only ran 70. # Looks like your test died just after 70. FAILED--expected 200 tests, saw 70 Probably a missing SKIP.
Re: [Fwd: CPAN Upload: J/JP/JPEACOCK/version-0.48.tar.gz]
John Peacock wrote: Rafael Garcia-Suarez wrote: Unfortunately : lib/version...Undefined subroutine main::qv called at ../lib/version.t line 234. # Looks like you planned 200 tests but only ran 70. # Looks like your test died just after 70. FAILED--expected 200 tests, saw 70 I swear I ran the tests (with a threaded Perl) before I sent this... Probably a missing SKIP. No, it was a missing export. Apply this on top of the previous patch: Thanks, both applied as change #25416.
Re: perlpodspec vs. Pod::Perldoc vs. Pod::Parser
On 9/14/05, Joshua Hoblitt [EMAIL PROTECTED] wrote: [...] I think that Pod::Parser is probably the one properly following the spec.. Can anyone help confirm or clarify what the correct behavior here is? That would be Sean Burke, maintainer of both perlpodspec and Pod::Parser.
Re: [perl #37163] dprofpp array subscript error
[EMAIL PROTECTED] (via RT) wrote: The dprofpp that comes with perl 5.8.6 and 5.8.4 (haven't tried others) has a bug where a non-existent array element is assigned to which makes dprofpp die. I create a profile like this: dprofpp -Q -p program.pl and I get this tmon.out (gz): http://perlcode.org/dprofpp_bug/tmon.out.gz I try to profile it like this: dprofpp -I -g main::do_loop and receive this error: Modification of non-creatable array value attempted, subscript -1 at /usr/bin/dprofpp line 662, fh line 1100. This happens on FreeBSD and Mac OSX under the above Perl versions. This patch helps (I'm not sure if something is not being counted, however. It may be that the chunk of code that creates the array index below needs to be moved to before this section): Thanks, applied as change #25413 to bleadperl.
Re: [PATCH] Math::Complex and Math::Trig updates (Re: [perl #37117] Math::Complex atan2 bug)
Jarkko Hietaniemi wrote: The attached patch (#1) brings several pending updates to Math::Complex and Math::Trig. - Complex: fix for the [perl #31117]: atan2(0, i) now works, as do all the (computable) complex argument cases (I adopted the Mathematica definition) - Complex: fixes for certain bugs in the make() and emake() - Complex: support returning the kth root directly - Complex: support [2,-3pi/8] in emake() - Complex: support 'inf' for make()/emake() (the 9**9**9 trick) - Complex: document make()/emake() more visibly - Trig: add more great circle routines: great_circle_waypoint() and great_circle_destination() I also made the modules scratch-proof, err, 5.00504 and 5.6.2-resistant. Since the Complex+Trig have had some fixes/updates over the years, maybe also them should be spun off to CPAN so that users of older Perls can use the latest versions? The tiny patch (#2) documents the attested fact that atan2(0, 0) is not well-defined (i.e., or ie., or ie, the result depends on the underlying math libraries). Both patches should be maint-worthy. Both applied to blead as #25414, thanks. But may I suggest that next time, you run tests before sending them ? Just look again at your next_test() function for lib/Math/Complex.t (I didn't apply this part) and you'll see that you made a trivial mistake... :) -- Faithful to this feeble magic, he would invent, so that they might not happen, the most atrocious particulars. -- Borges
Re: Stop fiddling with the bloody grammar (was Re: exempli gratia is e.g.)
Michael G Schwern wrote: What it does add is MAINTENANCE COST. Maintaining an extreme level of grammatical correctness and consistency over a large collection with multiple authors takes time and effort not just from the person doing the initial grammar fix but from all the CPAN authors who now have to reapply that patch and retrain their writing style. Not to mention all the mailing list noise it inevitably generates (remember the [ae]ffect thread?) Yeah. What he said.
Re: [MAINT24637] fails make test on OSX 10.4 (lib/locale.t)
Randal L. Schwartz wrote: At least it fails on only one thing... lib/locale FAILED at test 99 IIRC that's a problem with the system's locales. Did we have the word of some Apple expert on this ? it makes probably sense to disable those test for this version of Darwin.
Re: Questions regarding Perl instrumentation
Alexander Kolbasov wrote: Solaris (*) has a dynamic instrumentation tool called DTrace. It allows to *dynamically* instrument any running application and get useful information about its behavior with zero (or almost zero) impact on the application when it is not instrumented. This works fine with normal applications, but not so good with interpteded languages since C function names and data types have little to do with the structure of the interpreted language. I am playing with the idea of adding some hooks to Perl5 that will allow DTrace to be used for Perl programs (**). As an Maybe are you aware of http://blogs.sun.com/roller/page/alanbur?entry=dtrace_and_perl already ? initial experiment I changed Perl_runops_standard() function a bit and was able to use DTrace to trace start and end of each Perl OP evaluation. This is not You can also plug in your own runloop at compile time. See for example my module Runops::Switch on CPAN. very cool since there is no correlation between that and the Perl line numbers. So the first question I have is - Is it possible to get information about Perl script line number that the op belongs to? I need this information from the call to Perl_runops_standard(pTHX). In general, what is the good way (if any) to access line number information? The line number isn't stored in all ops, but only in COPs. You then get it with the CopLINE macro, see cop.h. A much more interesting thing is being able to trace Perl function calls. Seems like pp_entersub() is the right place to look at. This seems like a rather complex function that I don't quite understand. I hacked it a bit to get the name of the called function by using GvNAME(CvGV(cv)) which is, probably, not quite safe since I have not checked whether CvGV(cv) returns something non-NULL. So I have the second question: - What is the safe and efficient way (and place in pp_entersub()) to get the string representing the function name? I can't completely answer this off hand, but consider a few cases : - exported functions. maybe use EGV instead of GV - test with XSUBs - some functions are autoloaded - generally, I look at how the warnings and error display such things as function names and infer from that - Can I get the function name from pp_leavesub()? IIRC the CV is on the stack (popped by POPSUB). - Can I get line number information for the caller in pp_entersub()? You can use PL_curcop to get the current COP. HTH. Your project looks very interesting.
Re: Questions regarding Perl instrumentation
Alan Burlison wrote: Rafael Garcia-Suarez wrote: Maybe are you aware of http://blogs.sun.com/roller/page/alanbur?entry=dtrace_and_perl already ? As Rafael says, I've already done some work on this, documented at the link above. My intention is to put some generic macros into perl at the appropriate places. By default they woud be empty, in the case of Solaris you will be able to instantiate them as DTrace probes, on other platforms they could be whatever tracing system the platform supports. I think it's worth investigating doing it in a module, providing an alternate runloop or only changing the pp functions for entersub and leavesub.
Re: Questions regarding Perl instrumentation
Nicholas Clark wrote: From what I remember Alan telling me about what Dave had said, there are were a few more points other than entersub and leavesub that would need instrumentation. goto sub; was the most obscure, but I think that require was another. What about the unusual ways of exiting a subroutine, e.g. with next ?
Re: Questions regarding Perl instrumentation
Alan Burlison wrote: I'd be more than happy to do it in a module, but I'm not clear how I would replace functions in libperl from a module. Your module could, for example, replace the op_ppaddr fields of the ops you want to intrument with your own DTrace-enabled implementation. (I note that every op has an op_ppaddr field, which is probably some memory overhead. However that also means that you can instrument only part of the optree) Or your module can replace the runloop and provide alternate implementations directly in it for the ops you want to instrument. The whole point of dtrace is that it is lightweight enough to leave it in the code all the time. Loading an additional module normally requires that you stop/start the application, embedding the probes would mean you could enable the probes on the fly. That's a significant point for enabling DTrace at compile time in perl.
Re: [perl #37039] perlref documentation about optional - is too vague
Yitzchak Scott-Thoennes wrote: I think I like the idea, and the patch seems safe. What I don't like, though, is the lack of tests for this patch. Also, a minor concern is that people might unknowingly write non-backwards-compatible code with 5.10 by using this construct. Some basic tests: Thanks, both patches applied as change #25399. As to your minor concern, that may be a reason to not include it in maint. (Whether it's a bugfix or enhancement depends on how you interpret the doc.) I don't know how Nicholas is going to interpret it, but personnally I wouldn't include it. -- The man does not exist who, outside his own specialty, is not credulous. -- Borges
Re: [PATCH] Re: [MAINT24637] fails make test on OSX 10.4 (lib/locale.t)
On 9/13/05, Dominic Dunlop [EMAIL PROTECTED] wrote: It turns out that Mac OS X 10.4 has a bad Byelorussian locale as well as the bad Catalan ones. Patch that skips testing all of these attached. The patch (optimistically) assumes that Apple will have fixed things by the update after next. We shall see ... Thanks, applied as #25406 to blead.
Re: [perl #32884] API doc for SvUTF8
Steve Peters via RT wrote: Acutally, everything looking a return value from SvFLAGS(sv) should be looking for a U32. Since I'd like to automate these changes as much as possible, how does the following look? Fine, but probably all other docs for SvFLAGS bit tests need the same change, no ? --- sv.h.oldSat Sep 10 20:30:54 2005 +++ sv.hSat Sep 10 20:30:47 2005 @@ -703,8 +703,8 @@ SvFLAGS(sv) |= (SVf_NOK|SVp_NOK)) /* -=for apidoc Am|bool|SvUTF8|SV* sv -Returns a boolean indicating whether the SV contains UTF-8 encoded data. +=for apidoc Am|U32l|SvUTF8|SV* sv +Returns a U32 value indicating whether the SV contains UTF-8 encoded data. =for apidoc Am|void|SvUTF8_on|SV *sv Turn on the UTF-8 status of an SV (the data is not changed, just the flag). There will probably need to be some changes in the core as well where any of Sv*OK-like macros are on the right side of an assignment.
Re: [perl #37142] h2xs skips enums with negative values
Aaron Kaplan (via RT) wrote: h2xs doesn't generate any code for an enum constant with an explicitly declared negative value, e.g. enum foo { bar = -1 }, because the regular expression for parsing enums doesn't allow for the minus sign. Here's a patch. --- h2xs-5.9.2 2005/09/11 12:40:25 1.1 +++ h2xs-5.9.2 2005/09/11 12:43:38 1.2 Thanks, applied as change #25388.
Re: [perl #36448] [PATCH] configuring ranlib for perl on osx with xcode 2.1
On 9/11/05, Steve Peters via RT [EMAIL PROTECTED] wrote: Has anyone looked at this patch yet? I'm assuming that since it was written against 5.6.1 rather than the current bleadperl and it isn't in diff -u format, a new patch might be needed. One question comes to mind when I look at it, though. Have you tested the patch on a non-Tiger system? Yes. I wonder whether the same effect can be achieved only by patching the Darwin hints file.
Re: [perl #37128] undefing *foo{CODE} does not fully work
On 9/10/05, Dave Mitchell [EMAIL PROTECTED] wrote: Undefing a sub is not the same as deleting a sub. Internally, the CV continues to exist, but its pad and op tree are freed. cf: One of the items on the todo list is to allow the construct delete foo; I could finish my patch to do it if I could figure out how to delete a CV cleanly from all the stashes where it's referenced... (subs have this tendency to be exported in other stashes.)
__DATA__ and fcntl flags
In toke.c, in the part of code that sets the file descriptor for __DATA__, there is this chunk of code : #if defined(HAS_FCNTL) defined(F_SETFD) { const int fd = PerlIO_fileno(PL_rsfp); fcntl(fd,F_SETFD,fd = 3); } #endif The 3rd argument to fcntl() puzzles me. It's supposed to be a sum of flags, not a boolean value. Thus it doesn't look portable at all. On Linux and BSD it looks like this code tries to set O_WRONLY on the __DATA__ filehandle, which is obviously wrong (and won't succeed anyway.) My fcntl(2) manpage says : On Linux this command can only change the O_APPEND, O_ASYNC, O_DIRECT, O_NOATIME, and O_NONBLOCK flags. What's the sensible thing to do ?
Re: __DATA__ and fcntl flags
I wrote: What's the sensible thing to do ? Ooh, Spider Boardman points to me that I misread F_SETFD as F_SETFL. I blame a friday afternoon and a hard week...
Re: [PATCH blead] Make t/op/local.t use test.pl.
On 9/8/05, H.Merijn Brand [EMAIL PROTECTED] wrote: On Wed, 7 Sep 2005 22:45:44 -0400, Rick Delaney [EMAIL PROTECTED] wrote: I wanted to add some tests to the middle of t/op/local.t but saw I'd have to renumber everything. Patch 1 changes it to use test.pl so numbering doesn't matter. Patch 2 moves some tests where they belong. My tests are forthcoming. Wasn't this because the t/op (at least most of them) were testing basic stuff that was too basic to allow test.pl? There are already 50 tests in t/op that use test.pl. One could argue that test.pl uses local(), but basically I think applying Rick's patch is harmless.
Re: [perl #37091] File::Path::mkpath resets errno
[EMAIL PROTECTED] (via RT) wrote: When calling File::Path::mkpath and one of the mkdir fails, the functions checks if the directory was not created by other process. The problem is the check resets $! and so there is no way how the caller may find out the reason ($@ contains only locale specific message). The solution is attached bellow. Thanks, applied to the development sources of perl as change #25362.
Re: exempli gratia is e.g.
On 9/7/05, Mark Jason Dominus [EMAIL PROTECTED] wrote: I would like to suggest that Latin is obscure, and latin abbreviations are doubly obscure. There is no space constraint that should require us to use e.g. in place of for example. Using i.e. in place of that is is even sillier. (57% sillier, in fact.) How do you get that result ? I'm closer to 63.63%.
Re: Fwd: CPAN Upload: G/GB/GBARR/IO-1.22.tar.gz
Graham Barr wrote: I have made a new IO release with files from the repository. I did need to make some change so that it would compile with 5.6.1 Thanks, I applied it as such : Change 25355 on 2005/09/06 by [EMAIL PROTECTED] Upgrade to IO 1.22 from gbarr - Adjust the regression tests to use t/test.pl from bleadperl when $ENV{PERL_CORE} is defined - Add can_ok and isa_ok to t/test.pl from the implementation found in the IO CPAN distribution The adjustments I made to the tests IO.t, io_file.t and io_utf8.t is to modify the initial require like this : require($ENV{PERL_CORE} ? ./test.pl : ./t/test.pl)
Re: [CRACK] build a better runloop
Nicholas Clark wrote: On Fri, Sep 02, 2005 at 12:07:21PM +0200, Rafael Garcia-Suarez wrote: OK, Runops::Switch 0.01 just uploaded to CPAN. From my very first tests, it's slower. To make it faster, would it need to inline the hot ops? OK, 0.02 uploaded to play with : 0.02 - 06 Sep 2005 Inline some small hot ops, taking code from current bleadperl : null, stub, scalar, pushmark, const, gv, pushre, stringify, and, or, cond_expr, nextstate, unstack, setstate Compiles with 5.8.7. Of course, this raises portability problems among different versions of perl, and I didn't took time to put a ppport.h in there. Here's an arguably contrived example : $ time perl -e '$i=0;while(++$i1000){$i=~/00/ and $y = 0}' 4.20user 0.00system 0:04.21elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+413minor)pagefaults 0swaps $ time perl -Mblib -MRunops::Switch -e '$i=0;while(++$i1000){$i=~/00/ and $y = 0}' 4.07user 0.00system 0:04.08elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+640minor)pagefaults 0swaps Ooh, it's faster. I don't expect it to be always faster, though.
Re: Tied hash numeric values are rounded off under Perl v5.8.6
Yitzchak Scott-Thoennes wrote: However, the bug I thought was there indeed was for scalar magic: sub TIESCALAR { bless {} } sub FETCH { my $x=3.3; 1 if 0+$x; $x } tie $h, main; print $h; prints 3 and should IMO print 3.3. The following fixes it, though I haven't run full tests yet: Thanks, applied as change #25358, your testcase added to t/op/tie.t. --- perl/mg.c.orig 2005-08-01 07:28:07.0 -0700 +++ perl/mg.c 2005-09-01 22:24:40.072814400 -0700
Re: [PATCH] Compress::Zlib-1.38
On 9/6/05, Paul Marquess [EMAIL PROTECTED] wrote: Syncs the core with CPAN Thanks, applied as change #25361.
Re: regression test for 25352
Thanks, applied as #25354.
Re: _ handle and sub _
On 9/5/05, Dintelmann, Peter [EMAIL PROTECTED] wrote: When a subroutine _ is defined it may mask the _ handle used by file test operators. #!/opt/perl32/bin/perl use strict; use warnings; sub _ { /etc/hosts } open my $f, /dev/null or warn $!; stat $f or warn $!; print size: , -s _, \n; In the last line sub _ is invoked and the script prints the size of /etc/hosts instead of 0. However -X *_ seems to get this right. Should we mention this in perlfunc? I don't think so, since this behaviour is the same with any other identifier.
Re: [perl #37039] perlref documentation about optional - is too vague
On 9/5/05, Yitzchak Scott-Thoennes [EMAIL PROTECTED] wrote: Any other feedback on making (LIST)[LIST]- not need the -? I think I like the idea, and the patch seems safe. What I don't like, though, is the lack of tests for this patch. Also, a minor concern is that people might unknowingly write non-backwards-compatible code with 5.10 by using this construct.
Re: [CRACK] build a better runloop
Paul Johnson wrote: On Thu, Sep 01, 2005 at 04:45:54PM +0200, Rafael Garcia-Suarez wrote: Correct me if I'm wrong, but the whole runloop is pluggable, and can be replaced by any CPAN module. Right. The main problem being, how to replace the top level runloop. I'm not sure that would be necessary, at least not to start with. The new runops would just kick in the first time a loop was needed after the module was loaded. OK, Runops::Switch 0.01 just uploaded to CPAN. From my very first tests, it's slower.
Re: File::Temp: euid in _is_safe(); safe_level(MEDIUM) for taint mode
Alexey Tourbin wrote: Hello, The patch is explained below. This patch looks sensible to me. Tim, any objection ? Also, why use ${\cTAINT} instead of ${^TAINT} ? for older perls I suppose ? --- File/Temp.pm- 2005-04-03 15:27:16 + +++ File/Temp.pm 2005-08-16 22:50:39 + @@ -679,11 +679,11 @@ sub _is_safe { return 1 if $^O eq 'VMS'; # owner delete control at file level # Check to see whether owner is neither superuser (or a system uid) nor me - # Use the real uid from the $ variable + # Use the effective uid from the $ variable # UID is in [4] - if ($info[4] File::Temp-top_system_uid() $info[4] != $) { + if ($info[4] File::Temp-top_system_uid() $info[4] != $) { -Carp::cluck(sprintf uid=$info[4] topuid=%s \$=$ path='$path', +Carp::cluck(sprintf st_uid=$info[4] topuid=%s euid=$ path='$path', File::Temp-top_system_uid()); $$err_ref = Directory owned neither by root nor the current user @@ -2241,4 +2241,10 @@ security enhancements. =cut +{ +no strict 'refs'; +File::Temp-safe_level(MEDIUM) +if ${\cTAINT}; +} + 1; End of patch First, real/effective UID distinction is essential for setuid scripts. Filesystem permissions are controlled by the effective UID of the process. When a privileged script is checking if the directory is safe, it should check that the directory is *not* owned by the caller. Otherwise, the user can replace a temporary file created by the privileged process, which is almost certainly not what we want. Second, I suggest to enable MEDUM security level for taint mode, which is on when running setuid/setgid scripts. It's only on MEDUM level that the above _is_safe() security check is performed.
Re: [ANNOUNCE] Archive::Tar 1.25
Robin Barker wrote: On 8/25/05, Jos I. Boumans [EMAIL PROTECTED] wrote: Thanks, applied as 12201, with the following additions: * add pod to ptardiff so it gets a manpage I also just fixed a test failure when perl was built with -Dmksymlinks. I think this isn't a common configuration since nobody found it before. Patch at : http://public.activestate.com/cgi-bin/perlbrowse?patch=25333 - I don't think this is the best fix for this. Not only do I use -Dmksymlinks but I sometimes do: % sh ../perl-current/Configure -des -Dmksymlinks -Dusedevel % make all test % make distclean % sh Configure -des -Dusedevel -Duse64bitint -Dnoextensions=Encode This now fails the fixed Archive::Tar test. Better to create the required files as not links in Archive/Tar/t/00_setup.t See the attached patch; it is also necessary to do. % rm -rf lib/Archive/Tar/t/src/long/b lib/Archive/Tar/t/src/short/b Thanks, applied as change #25348 to bleadperl.
Re: File::Temp: euid in _is_safe(); safe_level(MEDIUM) for taint mode
On 9/2/05, Tim Jenness [EMAIL PROTECTED] wrote: I replied on the RT page. I've committed the first part to my local CVS and it will be in the next release. Oh, ok, the CPAN RT page I presume, since there is to ticket for that on rt.perl.org. So, everybody, just make my pumpking life a bit easier. I can't track every single dual-life module on CPAN. My pool of information is the P5P mailing list. Post your information here. /rant Anyway, thanks, and I'll wait for your next release.
Re: document index() with out of bounds POSITION
On 9/2/05, Yitzchak Scott-Thoennes [EMAIL PROTECTED] wrote: --- perl/pod/perlfunc.pod.orig 2005-08-30 12:23:17.0 -0700 +++ perl/pod/perlfunc.pod 2005-09-02 05:12:10.841292800 -0700 @@ -2339,7 +2339,9 @@ =item index STR,SUBSTR the wildcard-like behavior of a full regular-expression pattern match. It returns the position of the first occurrence of SUBSTR in STR at or after POSITION. If POSITION is omitted, starts searching from the -beginning of the string. The return value is based at C0 (or whatever +beginning of the string. POSITION before the beginning of the string +or after its end is treated as if it were the beginning or the end, +respectively. POSITION and the return value are based at C0 (or whatever Thanks, applied as change #25351.
Re: Optree Generation
On 8/31/05, Yitzchak Scott-Thoennes [EMAIL PROTECTED] wrote: The method_named ops are the unimport() method calls that no generates. It seems that the SV that holds the method name has an integer value also (perhaps related to sharing?) and Concise is showing that in preference to the string value. The following (untested) would be an unobtrusive way to fix this in this one case, though it might be better for concise_sv to dump both the string and numeric values when both are present. Thanks, applied as change #25352.
Re: sort {$b cmp $a} and the peephole optimiser
Nicholas Clark wrote: Where does the op for cmp go in this? $ perl -MO=Concise -e '@a = sort {$b cmp $a} @b' I see: c @ leave[1 ref] vKP/REFC -(end) 1 0 enter -2 2 ; nextstate(main 2 -e:1) v -3 b 2 aassign[t2] vKS -c -1 ex-list lK -8 3 0 pushmark s -4 7 @ sort lK/DESC -8 4 0 pushmark s -5 6 1 rv2av[t3] lK/1 -7 5 $ gv(*b) s -6 -1 ex-list lK -b 8 0 pushmark s -9 a 1 rv2av[t1] lKRM*/1 -b 9 $ gv(*a) s -a I expected to see an ex-scmp in there. Is the cmp ever compiled to ops? yes, but it's freed in S_simplify_sort, called by ck_sort during optree construction, i.e. before the peephole optimizer is called. Concise shows the DESC flag on the sort op that indicates this is a reverse sort.
Re: s///ge; consumes PL_tmps_stack in its loop
YAMASHINA Hio wrote: Hi. A large amount of s///ge; consumes PL_tmps_stack in its loop. This occues REPLACEMENT (right) part has statement ( eg. s//$x;$x/ge;). Patch is follows: diff -urN perl-5.8.7.orig/pp_ctl.c perl-5.8.7/pp_ctl.c --- perl-5.8.7.orig/pp_ctl.c2005-04-22 23:12:38.0 +0900 +++ perl-5.8.7/pp_ctl.c 2005-08-30 10:55:05.0 +0900 @@ -188,6 +188,11 @@ if (!(cx-sb_rxtainted 2) SvTAINTED(TOPs)) cx-sb_rxtainted |= 2; sv_catsv(dstr, POPs); + if( (cx-sb_iters0x)==0 ) { OK, so if I understand correctly, you're doing that every 65536th loop ? Just trying to understand your patch a bit more. + /* shrink tmps stack */ + FREETMPS; + SAVETMPS; + } /* Are we done */ if (cx-sb_once || !CALLREGEXEC(aTHX_ rx, s, cx-sb_strend, orig,
Re: [CRACK] build a better runloop
Nicholas Clark wrote: Leo has just done a talk on parrot, where he showed a graph showing the relative speeds of runloops. The switch runloop is about 3-4 times faster What's a switch runloop ? What would it switch on ? PL_op-op_type ? Would it be really faster than a function pointer call ? Correct me if I'm wrong, but the whole runloop is pluggable, and can be replaced by any CPAN module. Right.
Re: [CRACK] build a better runloop
Rafael Garcia-Suarez wrote: Nicholas Clark wrote: Leo has just done a talk on parrot, where he showed a graph showing the relative speeds of runloops. The switch runloop is about 3-4 times faster What's a switch runloop ? What would it switch on ? PL_op-op_type ? Would it be really faster than a function pointer call ? This was a rhetorical question. How would we know without benchmarks :) Correct me if I'm wrong, but the whole runloop is pluggable, and can be replaced by any CPAN module. Right. The main problem being, how to replace the top level runloop.
no 6;
I just commited into bleadperl a patch that implements this : $ ./perl -e 'no 5' Perls since v5.0.0 too modern--this is v5.9.3, stopped at -e line 1. BEGIN failed--compilation aborted at -e line 1. That is, the exact opposite of the current use VERSION syntax. One of the uses I had in mind for it is to put no 6 at the top of modules or programs that are too tightly bound to Perl 5 that there wouldn't be beneficial to port them to Perl 6. B::* or Safe come to mind. Of course, that would mean that Perl 6 should also recognize and handle the no 6 idiom. That's why I'm cc:ing p6l. Comments ? The patch can be found at http://public.activestate.com/cgi-bin/perlbrowse?patch=25344
Re: [EMAIL PROTECTED] ext/Dev/Peek/t/peek.t fix for VMS
John E. Malmberg wrote: This fixes test 21 on blead-perl to pass on VMS. The hash set by VMS now has the READONLY and FAKE attributes, and two of the three VMS resources that are represented by ENV hashes are not null terminated and can contain binary values. Thanks, applied as change #25340.
Re: [perl #37036] perl segfault at 'compile'-time
[EMAIL PROTECTED] (via RT) wrote: Priority is low, since this code is incorrect, but it might help resolving other issues. the segfault does not appear when not using 'strict'. note that no code is executed since it's in a sub that is never called at runtime. -- CODE BEGINS HERE -- #!/usr/bin/perl use strict; sub s { open $X, my $Y, r; } -- CODE ENDS HERE -- Thanks for the report, fixed as below in the development version of perl: Change 25341 by [EMAIL PROTECTED] on 2005/08/31 14:14:21 Fix for [perl #37036] perl segfault at 'compile'-time Affected files ... ... //depot/perl/op.c#702 edit Differences ... //depot/perl/op.c#702 (text) @@ -5896,6 +5896,7 @@ (last-op_private OPpCONST_STRICT) (oa = first-op_sibling) /* The fh. */ (oa = oa-op_sibling)/* The mode. */ +(oa-op_type == OP_CONST) SvPOK(((SVOP*)oa)-op_sv) (mode = SvPVX_const(((SVOP*)oa)-op_sv)) mode[0] == '' mode[1] == '' /* A dup open. */
Re: [perl #36848] Sys::Syslog::syslog kills program if syslogd not running
Ed Ravin wrote: In that case, we have a documentation bug - the fact that Sys::Syslog might crash the calling program with croak() is not mentioned in its man page. Would you accept patches for a nocroak or nofatal option to be used in Sys::Syslog::openlog() to disable the fatal exit behavior? I applied the following to bleadperl : Change 25342 by [EMAIL PROTECTED] on 2005/08/31 15:14:28 Document that Sys::Syslog::openlog might die. Fixes [perl #36848] Sys::Syslog::syslog kills program if syslogd not running Affected files ... ... //depot/perl/ext/Sys/Syslog/Syslog.pm#29 edit Differences ... //depot/perl/ext/Sys/Syslog/Syslog.pm#29 (text) @@ -53,13 +53,15 @@ =item openlog $ident, $logopt, $facility +Opens the syslog. I$ident is prepended to every message. I$logopt contains zero or more of the words Ipid, Indelay, Inowait. The cons option is ignored, since the failover mechanism will drop down to the console automatically if all other media fail. I$facility specifies the part of the system to report about, for example LOG_USER or LOG_LOCAL0: see your Csyslog(3) documentation for the facilities available in -your system. +your system. This function will croak if it can't connect to the syslog +daemon. BYou should use openlog() before calling syslog().
Re: [EMAIL PROTECTED] hv.c vms environment fix.
John E. Malmberg wrote: In Perl_hv_iternext_flags, on the VMS platform, the calls prime_env_iter() which can load up new environment values. If it does, then the index to the environment hash needs to be reset, otherwise it cause this problem. This patch appears to fix this. It is quite possible that there are better ways of doing this, and that this also potentially affects any other platform that calls prime_env_iter(). Thanks, applied as change #25535.
Re: ext/Devel/Peek/t/Peek.t failure on VMS question
John E. Malmberg wrote: The dump of [EMAIL PROTECTED] on VMS produces the following output that is different from the expected. In particular, there is no trailing null on the value on the resulting value, and it has the additional flags of READONLY and FAKE. What I do not know is if this is an intended behavior on VMS as a side effect of creating or modifying $ENV{PATH}. As far as I can tell from a quick glance, the \0 absence is a bug, but harmless since perl doesn't use a trailing \0 to mark end of strings internally ; and the FAKE/READONLY flags are ok, due to the way %ENV is handled on VMS. got: [ snip SV = PVMG(0x2b5770) at 0x28c6d8 FLAGS = (TEMP,POK,FAKE,READONLY,pPOK) PV = 0x2c4e84 PATH snip ] expected: [ (?:ALLOCATED at .*? )?SV = PVMG\(0x[[:xdigit:]]+\) at 0x[[:xdigit:]]+ snip FLAGS = \(TEMP,POK,pPOK\) (?: IV = 0 )? PV = 0x[[:xdigit:]]+ (?i:PATH)\\0 snip ] not ok 21
Re: sv-head refactor
Jim Cromie wrote: attached patch does nothing - ie it changes no behavior whatsoever (i tested it to be sure - all tests pass) it just pulls the the common structure of the various sv, av, hv, gv etc types into a pair of macros. Thanks, applied as change #25337.
Re: [perl #37000] New version of Text::Tabs, Text::Wrap
David Muir Sharnoff (via RT) wrote: I've rolled a new release of Text::Tabs Text::Wrap. Please pull it into the current development perl5. You can find it on CPAN or from ftp://ftp.idiom.com/users/muir/CPAN/modules It appears that you've missed a from bleadperl (at least one) : http://public.activestate.com/cgi-bin/perlbrowse?patch=24273 is it intentional ?
Re: [EMAIL PROTECTED] t/op/magic.t - Last 3 tests invalid on VMS
John E. Malmberg wrote: According to the code in mg.c / Perl_magic_clear_all_env() the last three tests can not be done on VMS, EPOC, and SYMBIAN. I do not know how to test for EPOC or SYMBIAN, but this patch will handle the VMS case. Thanks, applied as #25336.
Re: [patch pod/perlmod.pod] CLONE_SKIP addition version is wrong
On 8/30/05, Stas Bekman [EMAIL PROTECTED] wrote: CLONE_SKIP was added in 5.8.7, not 5.7.2. Please use the patch in the attachment. Already fixed in blead by : Change 24822 by [EMAIL PROTECTED] on 2005/06/13 12:49:18 Subject: [PATCH] Re: [perl #36047] perlmod.pod/CLONESKIP error From: Offer Kaye [EMAIL PROTECTED] Date: Thu, 2 Jun 2005 09:14:53 +0300 Message-ID: [EMAIL PROTECTED]
Re: [perl #36976] system() always returns -1 in forked child with SIG{CHLD}='IGNORE' in parent
On 8/23/05, Rick Delaney [EMAIL PROTECTED] wrote: My footnote was paraphrased from `man 2 wait` and IMO the described behaviour is a bug. And it must have been a bug in someone else's opinion too since wait/waitpid do not behave like that on Linux. At least they don't for me with kernel 2.6.8 and a C program. They behave the SysV way (return -1 and set ECHILD when SIG_IGN). I guess the man page is out of date. So perl is behaving exactly like the underlying system call. Sorry for any confusion. I applied the following clarification to perlfunc : Change 25339 by [EMAIL PROTECTED] on 2005/08/30 18:55:46 Clarify the cases where system() returns 1, per a suggestion of Rick Delaney (bug #36976) Affected files ... ... //depot/perl/pod/perlfunc.pod#490 edit Differences ... //depot/perl/pod/perlfunc.pod#490 (text) @@ -6012,11 +6012,12 @@ of CIO::Handle on any open handles. The return value is the exit status of the program as returned by the -Cwait call. To get the actual exit value, shift right by eight (see below). -See also L/exec. This is Inot what you want to use to capture +Cwait call. To get the actual exit value, shift right by eight (see +below). See also L/exec. This is Inot what you want to use to capture the output from a command, for that you should use merely backticks or Cqx//, as described in Lperlop/`STRING`. Return value of -1 -indicates a failure to start the program (inspect $! for the reason). +indicates a failure to start the program or an error of the wait(2) system +call (inspect $! for the reason). Like Cexec, Csystem allows you to lie to a program about its name if you use the Csystem PROGRAM LIST syntax. Again, see L/exec.
Re: [ANNOUNCE] Archive::Tar 1.25
On 8/25/05, Jos I. Boumans [EMAIL PROTECTED] wrote: Thanks, applied as 12201, with the following additions: * add pod to ptardiff so it gets a manpage I also just fixed a test failure when perl was built with -Dmksymlinks. I think this isn't a common configuration since nobody found it before. Patch at : http://public.activestate.com/cgi-bin/perlbrowse?patch=25333
Re: PathTools 3.10 released
On 8/26/05, Ken Williams [EMAIL PROTECTED] wrote: I finally found time to implement the code for the prospective tests that Schwern added to File::Spec, so I uploaded 3.10 to CPAN. Should be hitting mirrors now. Thanks, integrated to blead as change #25534. Note: File::Spec::Mac in bleadperl has local changes (typos in documentation) that you haven't integrated yet.
Re: [Fwd: CPAN Upload: J/JP/JPEACOCK/version-0.47.tar.gz]
Steve Peters wrote: On Wed, Aug 24, 2005 at 06:20:11PM +0200, Rafael Garcia-Suarez wrote: John Peacock wrote: The uploaded file version-0.47.tar.gz has entered CPAN as file: $CPAN/authors/id/J/JP/JPEACOCK/version-0.47.tar.gz size: 30615 bytes md5: 9de482a423cae72b9232e8ade250f8dd = Attached, please find a patch to bleadperl to bring it up to snuff. This includes some improvements to the parser to deal with real-world data provided by Andreas Koenig as well as a new validation routine to prevent SEGV's with badly written subclasses (also noted by Andreas). There are also a few changes to make the code more consistent with the rest of the util.c codebase (whitespace as well as Perl_* function naming conventions). Thanks, applied as change #25325. The patch, however, has broken the smokes. Should be fixed now (change #25326) by restoring some Perl_* prefixes.
Re: update B::Concise pod to reflect previous changes
Jim Cromie wrote: --- ../bleadperl/ext/B/B/Concise.pm 2005-08-02 05:09:07.0 -0600 Thanks, applied as change #25327.
Re: [PATCH] POD nit in perlvar.pod
On 8/23/05, Steve Peters [EMAIL PROTECTED] wrote: And who says spending time on #perl is a waste of time. heh. Following nit found while investigating some particularly nasty code. Thanks, applied.
Re: [Fwd: CPAN Upload: J/JP/JPEACOCK/version-0.47.tar.gz]
John Peacock wrote: The uploaded file version-0.47.tar.gz has entered CPAN as file: $CPAN/authors/id/J/JP/JPEACOCK/version-0.47.tar.gz size: 30615 bytes md5: 9de482a423cae72b9232e8ade250f8dd = Attached, please find a patch to bleadperl to bring it up to snuff. This includes some improvements to the parser to deal with real-world data provided by Andreas Koenig as well as a new validation routine to prevent SEGV's with badly written subclasses (also noted by Andreas). There are also a few changes to make the code more consistent with the rest of the util.c codebase (whitespace as well as Perl_* function naming conventions). Thanks, applied as change #25325.
Re: [PATCH] Add Windows Vista support to Win32::GetOSName()
Jan Dubois wrote: --- win32/ext/Win32/Win32.pm.~1~ Mon Aug 22 15:33:33 2005 +++ win32/ext/Win32/Win32.pm Mon Aug 22 15:33:33 2005 Thanks, applied as change #25321.
Re: [PATCH blead] Use SvGETMAGIC more often
Rick Delaney wrote: The attached patch replaces some code with the equivalent macro. Thanks, applied as change #25322.
Re: [ANNOUNCE] Archive::Tar 1.25
Jos I. Boumans wrote: - Add ptardiff program as suggested by KWILLIAMS (#13658) Hmm, you probably forgot this, then : --- Makefile.PL.orig2005-08-22 10:56:43.0 +0200 +++ Makefile.PL 2005-08-22 10:56:52.0 +0200 @@ -48,7 +48,7 @@ NAME= 'Archive::Tar', VERSION_FROM= 'lib/Archive/Tar.pm', # finds $VERSION dist= { COMPRESS = 'gzip -9f', SUFFIX = 'gz' }, -EXE_FILES = ['bin/ptar'], +EXE_FILES = ['bin/ptar', 'bin/ptardiff'], PREREQ_PM = $prereqs, AUTHOR = 'Jos Boumans kane[at]cpan.org', ABSTRACT= 'Manipulates TAR archives'
Re: Building 25309 on VAX (OpenVMS 7.2) not ok
Abe Timmerman wrote: It did, patch fixes it: --- configure.com.orig Sun Aug 21 16:26:55 2005 +++ configure.com Sun Aug 21 16:27:26 2005 @@ -4926,7 +4926,7 @@ $ sig_size=37 $ else $ sig_name = sig_name1 + sig_name2 + sig_name3 + sig_namert -$ sig_name_init = psnwc1 + psnwc2 + psnwc3 + psnwrt +$ sig_name_init = psnwc1 + psnwc2 + psnwc3 + psnwcrt Thanks, applied as change #25315.
Re: Documentation change for IPC::Open*.pm
Ben Tilly wrote: The attached patches clarify this by choosing filehandle names which are less prone to ambiguity. They're empty.
Re: [PATCH lib/CPAN.pm] Make curl follow redirects
Michael G Schwern wrote: curl won't follow redirects unless specificly told to do so with the -L flag. CPAN.pm currently doesn't give it this flag so it can't load from things like http://search.cpan.org/CPAN/ Patch attached. Thanks, applied as change #25317.
Re: Term::ANSIColor 1.10
Russ Allbery wrote: The URL ftp://ftp.eyrie.org/pub/software/modules/ANSIColor-1.10.tar.gz has entered CPAN as file: $CPAN/authors/id/R/RR/RRA/ANSIColor-1.10.tar.gz size: 11798 bytes md5: e71f4780026cd93c6a01b32ce98b541c Thanks, upgraded in bleadperl as change #25318. I also note that blead has the following typo fixes, which I preserved : --- ./ANSIColor.pm 2005-08-21 20:49:13.0 +0200 +++ /home/rafael/p4blead/lib/Term/ANSIColor.pm 2005-08-22 16:07:24.0 +0200 @@ -306,7 +306,7 @@ interface has the advantage of better compile time error checking, since misspelled names of colors or attributes in calls to color() and colored() won't be caught until runtime whereas misspelled names of constants will be -caught at compile time. So, polute your namespace with almost two dozen +caught at compile time. So, pollute your namespace with almost two dozen subroutines that you may not even use that often, or risk a silly bug by mistyping an attribute. Your choice, TMTOWTDI after all. @@ -391,7 +391,7 @@ constants aren't required, in which case you may feel free to insert commas unless you're using $Term::ANSIColor::AUTORESET.) -For easier debuging, you may prefer to always use the commas when not +For easier debugging, you may prefer to always use the commas when not setting $Term::ANSIColor::AUTORESET so that you'll get a fatal compile error rather than a warning.
Re: ./perl -I lib -Dp -e '{package Dog}; my $spot = 0' 2 dogless
Jim Cromie wrote: folks, I was poking around to see if I could figure out where perly.y handled 'my Dog $spot' differently than the dogless variety, and couldnt find it. It's handled upstream, by the tokenizer. Look up case KEY_my in toke.c.
Re: [ANNOUNCE] Archive::Tar 1.25
Jos I. Boumans wrote: On Aug 22, 2005, at 11:00 AM, Rafael Garcia-Suarez wrote: Jos I. Boumans wrote: - Add ptardiff program as suggested by KWILLIAMS (#13658) Hmm, you probably forgot this, then : Yes I did :( Thanks for the catch -- i'll apply just this patch and release 1.26. I've now upgraded bleadperl to 1.26. I also kept the following changes in bleadperl : and apologies for not having rounded them up earlier. Those are : - doc typos - don't load Data::Dumper, which isn't used anywhere AFAICT - add POD to ptar (so when it gets installed with perl, it has a manpage generated)diff -ur ./lib/Archive/Tar/Constant.pm /home/rafael/bleadperl/lib/Archive/Tar/Constant.pm --- ./lib/Archive/Tar/Constant.pm 2005-08-20 11:28:40.0 +0200 +++ /home/rafael/bleadperl/lib/Archive/Tar/Constant.pm 2005-08-22 12:50:05.0 +0200 @@ -40,7 +40,7 @@ use constant WRITE_ONLY = sub { $_[0] ? 'wb' . shift : 'w' }; use constant MODE_READ = sub { $_[0] =~ /^r/ ? 1 : 0 }; -# Pointless assigment to make -w shut up +# Pointless assignment to make -w shut up my $getpwuid; $getpwuid = 'unknown' unless eval { my $f = getpwuid (0); }; my $getgrgid; $getgrgid = 'unknown' unless eval { my $f = getgrgid (0); }; use constant UNAME = sub { $getpwuid || scalar getpwuid( shift() ) }; diff -ur ./lib/Archive/Tar/File.pm /home/rafael/bleadperl/lib/Archive/Tar/File.pm --- ./lib/Archive/Tar/File.pm 2005-08-20 11:28:40.0 +0200 +++ /home/rafael/bleadperl/lib/Archive/Tar/File.pm 2005-08-22 12:50:05.0 +0200 @@ -5,7 +5,6 @@ use File::Spec::Unix(); use File::Spec (); use File::Basename (); -use Data::Dumper; use Archive::Tar::Constant; diff -ur ./lib/Archive/Tar.pm /home/rafael/bleadperl/lib/Archive/Tar.pm --- ./lib/Archive/Tar.pm2005-08-20 11:28:40.0 +0200 +++ /home/rafael/bleadperl/lib/Archive/Tar.pm 2005-08-22 12:50:05.0 +0200 @@ -14,7 +14,7 @@ $DEBUG = 0; $WARN = 1; $FOLLOW_SYMLINK = 0; -$VERSION= 1.25; +$VERSION= 1.26_01; $CHOWN = 1; $CHMOD = 1; $DO_NOT_USE_PREFIX = 0; @@ -39,7 +39,6 @@ use File::Spec (); use File::Spec::Unix(); use File::Path (); -use Data::Dumper; # for debugging use Archive::Tar::File; use Archive::Tar::Constant; @@ -1166,7 +1165,7 @@ Returns true if we currently have CIO::String support loaded. Either CIO::String or Cperlio support is needed to support writing -stringified archives. Currently, Cperlio is the preffered method, if +stringified archives. Currently, Cperlio is the preferred method, if available. See the CGLOBAL VARIABLES section to see how to change this preference. @@ -1182,7 +1181,7 @@ This requires Cperl-5.8 or higher, compiled with Cperlio Either CIO::String or Cperlio support is needed to support writing -stringified archives. Currently, Cperlio is the preffered method, if +stringified archives. Currently, Cperlio is the preferred method, if available. See the CGLOBAL VARIABLES section to see how to change this preference. diff -ru ./bin/ptar /home/rafael/bleadperl/lib/Archive/Tar/bin/ptar --- ./bin/ptar 2005-06-24 17:14:57.0 +0200 +++ /home/rafael/bleadperl/lib/Archive/Tar/bin/ptar 2005-08-22 15:31:16.0 +0200 @@ -28,34 +28,34 @@ my @files; find( sub { push @files, $File::Find::name; print $File::Find::name.$/ if $verbose }, @ARGV ); - -Archive::Tar-create_archive( $file, $compress, @files ); + +Archive::Tar-create_archive( $file, $compress, @files ); exit; -} +} my $tar = Archive::Tar-new($file, $compress); if( $opts-{t} ) { -print map { $_-full_path . $/ } $tar-get_files; +print map { $_-full_path . $/ } $tar-get_files; -} elsif( $opts-{x} ) { +} elsif( $opts-{x} ) { print map { $_-full_path . $/ } $tar-get_files if $verbose; Archive::Tar-extract_archive($file, $compress); -} +} sub usage { qq[ -Usage: ptar -c [-v] [-z] [-f ARCHIVE_FILE] FILE FILE ... -ptar -x [-v] [-z] [-f ARCHIVE_FILE] -ptar -t [-z] [-f ARCHIVE_FILE] +Usage: ptar -c [-v] [-z] [-f ARCHIVE_FILE] FILE FILE ... +ptar -x [-v] [-z] [-f ARCHIVE_FILE] +ptar -t [-z] [-f ARCHIVE_FILE] ptar -h - + ptar is a small, tar look-alike program that uses the perl module -Archive::Tar to extract, create and list tar archives. - +Archive::Tar to extract, create and list tar archives. + Options: x Extract from ARCHIVE_FILE c Create ARCHIVE_FILE from FILE @@ -72,3 +72,34 @@ \n] } +=head1 NAME + +ptar - a tar-like program written in perl + +=head1 DESCRIPTION + +ptar is a small, tar look-alike program that uses the perl module +Archive::Tar to extract, create and list tar archives. + +=head1 SYNOPSIS + +ptar -c [-v] [-z
Re: [PATCH blead] Re: [perl #36959] List Constructor Operator - Undefined Values
Rick Delaney wrote: On Sun, Aug 21, 2005 at 01:00:07AM -0700, Yitzchak Scott-Thoennes wrote: IIRC (don't have time to check the code now), magic only results in the private flags being set (e.g. SvIOKp), so it all Just Works (TM). Ah, thanks. I could have sworn that I saw IOK with Devel::Peek in my preliminary tests but I must have been seeing things since I can't reproduce now. The problem is, as you stated, a missing mg_get. Patch included. Thanks, applied as change #25319.
Re: Documentation change for IPC::Open*.pm
Ben Tilly wrote: On 8/22/05, Rafael Garcia-Suarez [EMAIL PROTECTED] wrote: Ben Tilly wrote: The attached patches clarify this by choosing filehandle names which are less prone to ambiguity. They're empty. Huh, try again. Confusing. From Open2.diff : -$pid = open2(\*RDRFH, \*WTRFH, 'some cmd and args'); +$pid = open2(\*CHLD_IN, \*CHLD_OUT, 'some cmd and args'); I read CHLD_IN as child's input, so surely that should be the other way around ? Moreover, Open3.diff has : -$pid = open3(\*WTRFH, \*RDRFH, \*ERRFH, +$pid = open3(\*CHLD_IN, \*CHLD_OUT, \*CHLD_ERR, 'some cmd and args', 'optarg', ...); I hereby suppose that Open2.diff is backwards.
Re: Documentation change for IPC::Open*.pm
Ben Tilly wrote: On 8/22/05, Rafael Garcia-Suarez [EMAIL PROTECTED] wrote: Ben Tilly wrote: On 8/22/05, Rafael Garcia-Suarez [EMAIL PROTECTED] wrote: [...] Huh, try again. Confusing. From Open2.diff : -$pid = open2(\*RDRFH, \*WTRFH, 'some cmd and args'); +$pid = open2(\*CHLD_IN, \*CHLD_OUT, 'some cmd and args'); I read CHLD_IN as child's input, so surely that should be the other way around ? Moreover, Open3.diff has : -$pid = open3(\*WTRFH, \*RDRFH, \*ERRFH, +$pid = open3(\*CHLD_IN, \*CHLD_OUT, \*CHLD_ERR, 'some cmd and args', 'optarg', ...); I hereby suppose that Open2.diff is backwards. Gah. I didn't mean to demonstrate how the variable names in the API cause me confusion, but I guess I just did. :-( Yes, Open2.diff is backwards. OK :) thus, applied backwards as change #25320 :)
Re: [EMAIL PROTECTED] fixes to const fixes + Case Preserved start
John E. Malmberg wrote: I found some cases where the wrong pointer was being used as a result of the previous const fixes. Also added in fixes to better handle EFS file specifications and the underpinnings for the using the Case Sensitive and the Case Preserved mode of the VMS file system. Thanks, applied as change #25306.
Re: ++ turns undef into 0 first
On 8/18/05, Peter Scott [EMAIL PROTECTED] wrote: This recently bit me: $ perl -wle 'print 42 if defined($h{foo}++)' 42 Now, before thousands of you reach for the flamethrowers, yes, I know - now - that this is documented. I found it in perlop right where it ought to be: | undef is always treated as numeric, and in particular is changed to 0 | before incrementing (so that a post-increment of an undef value will | return 0 rather than undef). This was documented by Hugo as change 19014 : http://public.activestate.com/cgi-bin/perlbrowse?patch=19014 Hugo, any comment on this ? The only thing that perturbs me is that I had to find this after I was starting to wonder whether there was a bug. So this looks to me like suboptimal behavior that has been documented; any chance of making it behave the more logical way, i.e., that the expression evaluates to the original value and not some modified one? I can't imagine there is much code relying on the current behavior.
Re: [perl #36950] Bizarre warning message
Mark-Jason Dominus (via RT) wrote: use Data::Dumper; open my($O), , /tmp/out; print $O Data::Dumper-Dump([], []); print OK\n; This program generates the following output: Bareword found where operator expected at /tmp/bug.pl line 4, near $O Data::Dumper (Missing operator before Data::Dumper?) OK I can't reproduce with with either maint or blead.
Re: [perl #36951] POSIX build fails in bleadperl
David Dyck (via RT) wrote: Just rsync'ed to the latest blead perl as was surprised to get the following error (haven't dug through the diff's to find out what might have triggered this) Worksforme. Is this a clean build ?
Re: ++ turns undef into 0 first
Yitzchak Scott-Thoennes wrote: I remember a borderline acerbic discussion here; perhaps someone could read the archives and summarize what was said, rather than everyone restating the same opinions? This discussion doesn't appear in the P5P summaries of the time :(
Re: ++ turns undef into 0 first
[EMAIL PROTECTED] wrote: Rafael Garcia-Suarez [EMAIL PROTECTED] wrote: :On 8/18/05, Peter Scott [EMAIL PROTECTED] wrote: : This recently bit me: : : $ perl -wle 'print 42 if defined($h{foo}++)' : 42 : : Now, before thousands of you reach for the flamethrowers, yes, I know : - now - that this is documented. I found it in perlop right where it : ought to be: : : | undef is always treated as numeric, and in particular is changed to 0 : | before incrementing (so that a post-increment of an undef value will : | return 0 rather than undef). : :This was documented by Hugo as change 19014 : :http://public.activestate.com/cgi-bin/perlbrowse?patch=19014 :Hugo, any comment on this ? I'd much rather the behaviour were as Peter requests, but my synopsis in the thread covers my reasoning. Yes, that makes sense to me as well. As Jan Dubois put it, Does the numeric context change the value that the variable had retroactively?
Re: [PATCH] make threads.xs emit warnings properly
On 8/7/05, Tassilo von Parseval [EMAIL PROTECTED] wrote: Hi, the attached patch wraps ckWARN_d around the Perl_warn calls in threads.xs so that these default warnings can be switched off using no warnings 'threads' or the -X switch. Also included the corresponding changes to perldiag.pod. Thanks, applied as change #25307.
Re: Data::Dumper bug?
Yitzchak Scott-Thoennes wrote: On Mon, Aug 08, 2005 at 12:08:13PM -0500, Troy Loveday wrote: Gurusamy, Ilya Martynov is now the Data::Dumper maintainer. I have observed what I consider to be a bug in XS (C) implementation of Data::Dumper (the Perl implementation does not exhibit the problem). Problem: With Sortkeys(1), it leaves hash iterators in an indeterminate state. Subsequent code must reset the hash iterator with keys %hash (see perldoc -q reset). Good catch. It was uselessly iterating through the hash a second time after sorting, once for each key, so the iterator would be left at the end. --- perl/ext/Data/Dumper/Dumper.xs.orig 2005-06-21 03:08:44.0 -0700 +++ perl/ext/Data/Dumper/Dumper.xs 2005-08-08 19:58:15.415064000 -0700 @@ -614,9 +614,11 @@ DD_dump(pTHX_ SV *val, const char *name, I32 nlen; bool do_utf8 = FALSE; -if ((sortkeys !(keys (I32)i = av_len(keys))) || -!(entry = hv_iternext((HV *)ival))) -break; + if (sortkeys) { + if (!(keys (I32)i = av_len(keys))) break; + } else { + if (!(entry = hv_iternext((HV *)ival))) break; + } if (i) sv_catpvn(retval, ,, 1); End of Patch. I resisted the temptation to use ?: in the if condition :) Thanks, applied as change #25308 to bleadperl. I'm not sure how to test for that, however...
Re: autouse.pm: check stub, use goto in stub
Alexey Tourbin wrote: Hello, $ perl -e 'use autouse Pod::Usage = pod2usage((); pod2usage()' Undefined subroutine main::pod2usage called at -e line 1. $ --- autouse.pm- 2004-07-04 21:32:39 + +++ autouse.pm2005-08-18 05:01:52 + Thanks, both autouse patches applied as change #25302. @@ -63,7 +62,8 @@ sub import { }; if (defined $proto) { - *$closure_import_func = eval sub ($proto) { \$load_sub }; + *$closure_import_func = eval sub ($proto) { goto \$load_sub } + || die; } else { *$closure_import_func = $load_sub; } End of patch $ perl -e 'use autouse Pod::Usage = pod2usage((); pod2usage()' Prototype not terminated at (eval 1) line 1. ...propagated at /usr/lib/perl5/autouse.pm line 65. BEGIN failed--compilation aborted at -e line 1. $ I guess the latter behaviour is more appropriate. I also see no reason for saving a stub frame, so using goto should be ok.