Need help debugging blead on VMS - keys(%ENV)

2005-08-22 Thread John E. Malmberg
On every blead perl I have seen, the following bug is present on VMS and 
is causing the script t/op/magic.t to fail at test 7.


In the Perl debugger, before running any script if you issue the command 
'x keys(%ENV), the entry for index 0, also shows up as index 1.


  DB<1> x keys(%ENV)
0  'SYS$TIMEZONE_DAYLIGHT_SAVING'
1  'SYS$TIMEZONE_DAYLIGHT_SAVING'
2  'CDE$DETACHED_LOGICALS'
3  'MOP$NAMED_LOAD'
4  'BUILD_ROOT'

On all subsequent calls, you get the expected results:

  DB<2> x keys(%ENV)
0  'SYS$TIMEZONE_DAYLIGHT_SAVING'
1  'CDE$DETACHED_LOGICALS'
2  'MOP$NAMED_LOAD'
3  'BUILD_ROOT'
4  'SMBSRVSHR_TV'


http://perldoc.perl.org/functions/keys.html also seems to not agree with 
the way that keys() is currently working:


"As a side effect, calling keys() resets the HASH's internal iterator, 
see each. (In particular, calling keys() in void context resets the 
iterator with no other overhead.)"


DB <8> x keys()
Not enough arguments for keys at (eval 13)[../lib/perl5db.pl:628] line 
2, near "keys()"


values() seems to work the same way as keys().  The first call  of 
values(%ENV) in a program returns a list with he values repeated twice, 
subsequent calls are correct.


  DB<1> x each (%ENV)
0  'SYS$TIMEZONE_DAYLIGHT_SAVING'
1  1
  DB<2>
x each (%ENV)
0  'SYS$TIMEZONE_DAYLIGHT_SAVING'
1  1
  DB<3>
x each (%ENV)
0  'CDE$DETACHED_LOGICALS'
1  'DECW$DISPLAY,LANG'


-John
[EMAIL PROTECTED]
Personal Opinion Only


Re: Term::ANSIColor 1.10

2005-08-22 Thread Russ Allbery
Rafael Garcia-Suarez <[EMAIL PROTECTED]> writes:

> I also note that blead has the following typo fixes, which I preserved :

Thanks, these will be committed to my sources and will be in the next
release, so we'll resync at some point in the future.

> --- ./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.

-- 
Russ Allbery ([EMAIL PROTECTED]) 


Re: MP2 + Bleedperl broken

2005-08-22 Thread Stas Bekman

Philip M. Gollucci wrote:

Philip M. Gollucci wrote:


cat .patch
25309

Some notes:
The last time I did this it was 25216.
The version that Stas said works for him was 25292

Unless I am insane, 25309 is NEWER then both.



So I checked directly in the Perforce repository via the web tool.
25309 is indeed the _LATEST_ commit.  By Nicholas Clark.

http://public.activestate.com/cgi-bin/perlbrowse?recent=1
[50] 25309 on 2005/08/19 by [EMAIL PROTECTED]

Subject: [PATCH ext/POSIX/POSIX.xs] Whitespace
From: Abigail <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
Date: Sat, 23 Jul 2005 02:32:35 +0200


Just tried @25320, builds just fine for me.

--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


[PATCH] Add Windows Vista support to Win32::GetOSName()

2005-08-22 Thread Jan Dubois
--- win32/ext/Win32/Win32.pm.~1~Mon Aug 22 15:33:33 2005
+++ win32/ext/Win32/Win32.pmMon Aug 22 15:33:33 2005
@@ -195,7 +195,7 @@
90 => "Me"
},
2 => {
-   0  => "2000",
+   0  => "NT4",
1  => "XP/.Net",
 2  => "2003",
51 => "NT3.51"
@@ -212,9 +212,9 @@
 
 my $tag = "";
 
-# But distinguising W2k from NT4 requires looking at the major version
-if ($os eq "2000" && $major != 5) {
-$os = "NT4";
+# But distinguising W2k and Vista from NT4 requires looking at the 
major version
+if ($os eq "NT4") {
+   $os = {5 => "2000", 6 => "Vista"}->{$major} || "NT4";
 }
 
 # For the rest we take a look at the build numbers and try to deduce
@@ -483,6 +483,7 @@
 Windows 2000   2  5   0
 Windows XP 2  5   1
 Windows Server 20032  5   2
+Windows Vista  2  6   0
 
 On Windows NT 4 SP6 and later this function returns the following
 additional values: SPMAJOR, SPMINOR, SUITEMASK, PRODUCTTYPE.
End of Patch.




[perl #36922] perl crash on cygwin

2005-08-22 Thread Gerrit P. Haase via RT
I need more information about your perl!

I.e. what version of perl is this exactly?

Please send the output of `cygcheck -c perl` and perl -V (with capital 'V').

Why don't you use the perlbug script?


Gerrit


[perl #36810] Enhance ExtUtils::Embed robustness

2005-08-22 Thread Guest via RT
Yes, wait a minute.

Gerrit


[perl #36810] Enhance ExtUtils::Embed robustness

2005-08-22 Thread Gerrit P. Haase via RT
Hmm, was still logged in as guest...

It is a local patch anyway, I add the Win32CORE part and some more Win32
related stuff.  This should go back into the source anyway.  

The problem was that I used the initial patches, didn't updated after I
fixed it the first time... will do this now.


Gerrit


Re: [perl #36977] perl 5.8.7 Solaris Sparc compile error: no _ptr member in __FILE

2005-08-22 Thread Vahik Manookian

Hi Nicholas,

Not only the original body is lost, I don't have my email in my sent and 
trash box, and this is the third time that I am sending this reply. I 
think someone is mad at me :-)


Anyway,

I am trying to install perl5.8.7 in my solaris sparc but I get the 
following errors:

`sh  cflags "optimize='-O'" globals.o`  globals.c
 CCCMD =  /localdisk/vahik/05septBuild/bin/gcc -DPERL_CORE -c 
-m64 -O  -Wall

`sh  cflags "optimize='-O'" perlio.o`  perlio.c
 CCCMD =  /localdisk/vahik/05septBuild/bin/gcc -DPERL_CORE -c 
-m64 -O  -Wall

perlio.c: In function 'PerlIOStdio_unread':
perlio.c:3064: error: 'struct __FILE' has no member named '_ptr'
perlio.c:3072: error: 'struct __FILE' has no member named '_ptr'
perlio.c: In function 'PerlIOStdio_get_base':
perlio.c:3177: error: 'struct __FILE' has no member named '_base'
perlio.c:3178: warning: control reaches end of non-void function
perlio.c: In function 'PerlIOStdio_get_bufsiz':
perlio.c:3184: error: 'struct __FILE' has no member named '_cnt'
perlio.c:3184: error: 'struct __FILE' has no member named '_ptr'
perlio.c:3184: error: 'struct __FILE' has no member named '_base'
perlio.c:3185: warning: control reaches end of non-void function
perlio.c: In function 'PerlIOStdio_get_ptr':
perlio.c:3193: error: 'struct __FILE' has no member named '_ptr'
perlio.c:3194: warning: control reaches end of non-void function
perlio.c: In function 'PerlIOStdio_get_cnt':
perlio.c:3200: error: 'struct __FILE' has no member named '_cnt'
perlio.c:3201: warning: control reaches end of non-void function
perlio.c: In function 'PerlIOStdio_set_ptrcnt':
perlio.c:3209: error: 'struct __FILE' has no member named '_ptr'
perlio.c:3229: error: 'struct __FILE' has no member named '_cnt'
make: *** [perlio.o] Error 1

- The compoiler is gcc 4.0.1 buit using /usr/ccs/as and /usr/ccs/ld.
- the make is a gnu make 3.80
- I have to install the perl in my localdisk
- I faced with another compile error earlier. I found a solution for it 
by goolging. That compile error was something to do with 64 bit 
detection. The solution was to use -m64.


More info from the configuration output:

Guessing which symbols your C compiler and preprocessor define...
Your C pre-processor defines the following symbols:
_BIG_ENDIAN
__ELF__
_FILE_OFFSET_BITS
__GNUC__
__GNUC_MINOR__
_LARGEFILE64_SOURCE
_LARGEFILE_SOURCE
_LP64
__LP64__
__STDC__
__SVR4
sparc
__sparc
__sparc__
sun
__sun
__svr4__
unix
__unix
__unix__
__sun__


Info from myconfig:
---
perl-5.8.7 9:56 238 > myconfig
Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
 Platform:
   osname=solaris, osvers=2.8, archname=sun4-solaris
   uname='sunos wcars2at 5.8 generic_117350-25 sun4u sparc 
sunw,sun-blade-1500 solaris '

   config_args='-e -Dprefix=/localdisk/vahik/05septBuil -D'
   hint=previous, useposix=true, d_sigaction=define
   usethreads=undef use5005threads=undef useithreads=undef 
usemultiplicity=undef

   useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
   use64bitint=undef use64bitall=undef uselongdouble=undef
   usemymalloc=n, bincompat5005=undef
 Compiler:
   cc='/localdisk/vahik/05septBuild/bin/gcc', ccflags ='-m64',
   optimize='-O',
   cppflags='-m64 -m64'
   ccversion='', gccversion='4.0.1', gccosandvers=''
   intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
   d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
   ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8

   alignbytes=8, prototype=define
 Linker and Libraries:
   ld='ld', ldflags =' '
   libpth=/localdisk/vahik/05septBuild/lib
   libs=
   perllibs=
   libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
   gnulibc_version=''
 Dynamic Linking:
   dlsrc=dl_none.xs, dlext=none, d_dlsymun=undef, ccdlflags=''
   cccdlflags='', lddlflags=''

Vahik Manookian ESN: 39+51656

Vahik Manookian ESN: 39+51656


Nicholas Clark via RT wrote:


This is all we got:

On Mon, Aug 22, 2005 at 07:06:10AM -0700, Vahik Manookian wrote:
 

# New Ticket Created by  "Vahik Manookian" 
# Please include the string:  [perl #36977]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/rt3/Ticket/Display.html?id=36977 >



This transaction appears to have no content
   



Did the body of a bug report go missing?

The subject line suggests that perl failed to compile, with some sort of error
about no _ptr member in __FILE

How did you run perl's Configure script? Did you pass it any command line
arguments to change the behaviour from the default?
If running it interactively did you accept the default answers when
prompted?

Nicholas Clark




 



Re: ./perl -I lib -Dp -e '{package Dog}; my $spot = 0' 2> dogless

2005-08-22 Thread Dave Mitchell
On Mon, Aug 22, 2005 at 03:15:59PM -0400, Rick Delaney wrote:
> Here is some code I've used before with optimizer:
> 
> char* lexical_type(int pad_offset) {
> SV* lexname;
> lexname = *av_fetch(PL_comppad_name, pad_offset, TRUE);
> if (!(SvFLAGS(lexname) & SVpad_TYPED))
> return NULL;
> return HvNAME(SvSTASH(lexname));
> }

or see PAD_COMPNAME_TYPE()

-- 
Never do today what you can put off till tomorrow.


[ANNOUNCE] Compress::Zlib 2.x beta available on CPAN

2005-08-22 Thread Paul Marquess
I've just uploaded a beta version of Compress::Zlib version 2 onto CPAN. 

This is a substantial rewrite of Compress::Zlib that has touched the
majority of the existing code as well as adding some new features. I know a
lot of other modules rely either directly or indirectly on Compress::Zlib,
so I want to make sure I haven't screwed up before I remove the beta status
from the CPAN. (I also need to finish off some parts of the module, but
that's another story)

That's where I need some help -- feedback on any part of this release is
welcome, but at the moment I'm particularly keen on hearing how folk get on
with building the module on the more exotic Operating Systems out there. To
date I've checked the module works with Linux, Solaris, AIX and Windows XP.
I'm certain there are still wrinkles that need to be ironed out.

Similarly, if you have an application or module that uses Compress::Zlib
either directly or indirectly, I'd like to hear from you if you think I've
broken any backward compatibility with version 1.

Paul



RE: [perl #36976] system() always returns -1 in forked child with SIG{CHLD}='IGNORE' in parent

2005-08-22 Thread DeRykus, Charles E
 
> diff -ruN perl-current/pod/perlfunc.pod
perl-current-dev/pod/perlfunc.pod
> --- perl-current/pod/perlfunc.pod 2005-08-05 10:42:09.0
-0400
> +++ perl-current-dev/pod/perlfunc.pod 2005-08-22 13:19:01.312460976
-0400
> @@ -6017,6 +6017,8 @@
>  the output from a command, for that you should use merely backticks
or
>  C, as described in L.  Return value of -1
>  indicates a failure to start the program (inspect $! for the reason).
> +It could also mean that you have set C< $SIG{CHLD} = 'IGNORE' >, 

   + or that another SIGCHLD handler has already reaped the process

 
> +in which case the C call would return -1 (inspect $!).

It might be worth mentioning the other potential scenario in which 
wait returns -1. 

-- 
Charles DeRykus
 


Re: ./perl -I lib -Dp -e '{package Dog}; my $spot = 0' 2> dogless

2005-08-22 Thread Rick Delaney
On Mon, Aug 22, 2005 at 12:45:41PM -0600, Jim Cromie wrote:
> 
> So I should get a bit more specific;
> I thought Id try to define a few op-private flags on padsv, sassign, 
> aassign to indicate
> some manner of dog-ness / object-ness.
> 
> I dont have any strategy in mind, except to mark them in a way that 
> makes them
> easy to find with optimizer.pm.  Then all sorts of out-of-core hackery 
> can commence. >:-)

In that case, if you just need to be able to identify the class then
look at how fields.pm does it.  Grep for FIELDS in op.c and go up a bit.

Here is some code I've used before with optimizer:

char* lexical_type(int pad_offset) {
SV* lexname;
lexname = *av_fetch(PL_comppad_name, pad_offset, TRUE);
if (!(SvFLAGS(lexname) & SVpad_TYPED))
return NULL;
return HvNAME(SvSTASH(lexname));
}

HTH,

-- 
Rick Delaney
[EMAIL PROTECTED]


Re: ./perl -I lib -Dp -e '{package Dog}; my $spot = 0' 2> dogless

2005-08-22 Thread Jim Cromie

Rafael Garcia-Suarez wrote:


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.

 


looked, saw, these arent the droids im looking for.

I ran again w -DT, got a diff with 'Dog' as the only difference on 8 lines
(no point in showing them).

So I should get a bit more specific;
I thought Id try to define a few op-private flags on padsv, sassign, 
aassign to indicate

some manner of dog-ness / object-ness.

I dont have any strategy in mind, except to mark them in a way that 
makes them
easy to find with optimizer.pm.  Then all sorts of out-of-core hackery 
can commence. >:-)


Perl5 Bug Summary

2005-08-22 Thread Robert Spier

[Continuing our theme... in this summary we celebrate Christopher
Columbus' fourth and final trip to the "new world" wherin he named
the isle of Honduras.]

Perl5 Bug Summary

http://rt.perl.org/rt3/NoAuth/perl5/Overview.html
Generated at Mon Aug 22 13:00:10 2005 GMT
---

  * Total Issues
  * New Issues
  * Overview of Open Issues
  * Ticket Status By Version
  * Requestors with most open tickets

---

Total Issues

Open Tickets: 1502

---

New Issues

New issues that have not been responded to yet

1 - 2 weeks old
36896 autouse + DProf == segmentation fault
36890 Missing ";". (nosemi)
36889 Missing warning for bogus dirhandle name 
36888 Error message says "filehandle" but should say "dirhandle"   
36875 Certain string handling functions don't warn on undef
36837 B::Deparse fails when it comes to ByteLoader programs
2 - 3 weeks old
36815 [PATCH] warnings.pl/pm: Croaker function: bug (perl v5.8, v5.9)  
36795 Dprof/dprofpp reports incorrect subroutine call count if #Calls > 99 
3 - 4 weeks old
36733 %SIG not properly local-ized 
36691 string captured into $1, $2,... in pattern match sometimes have utf8 bit 
  "on" and sometimes "off". Even for the same patternmatch arguments   
36689 &=, |= and ^= overloads are nbot documented  
36675 -'-10' eq '+10'  
36664 Strange behavior of shared array 
36653 POSIX::SigSet double free with threads   
4 - 5 weeks old
36630 open <&=fd does not work like fdopen 
36614 bug  
5 - 6 weeks old
36539 Edge cases in "find_perl" algorithms 
36516 attributes.pm documentation is recursive and incomplete  
36513 Pod::Html exports two undocumented functions 
6 - 7 weeks old
7 - 8 weeks old
36448 configuring ranlib for perl on osx with xcode 2.1
36430 Sort within a sort does not set $a, $b   
8 - 9 weeks old
36347 Object destruction incomplete
9 - 10 weeks old   
36333 sort CONSTANT exhibits weird behavior
36291 incorrect $! from open ">&nr" with too many open files   
10 - 11 weeks old  
36248 print does not respect "use encoding 'utf8'" 
36229 Bizarre copy of IO   
11 - 12 weeks old  
36094 Wrong line number for FILEHANDLE reported by Xref (Xref.pm V1.01)
36079 use of `sexed' quotes gnot Unicode   
36078 Newz() used gratuitously 
36076 sv_upgrade and structure binary compatibility
36075 malloc_size/malloc_good_size 
36070 Not OK: perl v5.8.7 on darwin-thread-multi-2level 8.1.0 (UNINSTALLED)
36051 LVALUE magic should know how to assign to globs  
36049 Merge all the arenas 
36046 Special var @- becomes arbitrarily large 
12 - 13 weeks old  
13 - 14 weeks old  
35949 'use locale' does not enable number formatting locale
35865 tied hash bug (still present in 5.8.7-to-be), Test::More attached
14 - 15 weeks old  
35427 reset coredumps pre 5.8.0
35406 Wishlist about Sys:

Re: [perl #36960] B::Deparse and constant folding

2005-08-22 Thread Colin Meyer
Thanks for pointing out my silly oversight.

-Colin.

On Sun, Aug 21, 2005 at 04:09:51PM -0400, Rick Delaney wrote:
> On Fri, Aug 19, 2005 at 02:06:25PM -0700, Colin Meyer wrote:
> > While playing with constant folding and compiler optimizations, I
> > noticed something funny about B::Deparse.
> > 
> > It seems to strip the conditionals off of some statements, implying
> > that they will always be run. However, they do not get run.
> > 
> > 
> > Here's my test files:
> > 
> > A.pm:
> >   package A;
> >   use constant DEBUG => 1;
> >   1;
> > 
> > B.pm:
> >   package B;
> >   use constant DEBUG => 0;
> >   1;
> 
> This is the problem here.  When you run it with -MO=Deparse, Deparse
> loads the core B.pm so your B.pm is never loaded.  If you change the
> package name to "J", everything works fine.
> 


Re: [perl #36976] system() always returns -1 in forked child with SIG{CHLD}='IGNORE' in parent

2005-08-22 Thread Rick Delaney
On Mon, Aug 22, 2005 at 03:29:42AM -0700, Chris wrote:
> 
> Calls to system() in a forked child always return -1 if the parent has
> set SIG{CHLD}='IGNORE'. I would expect/hope it to return 0.
> 
> Demonstrated by:
> perl -e '$SIG{CHLD} = "IGNORE"; fork or sleep 0xbeef; print
> "system:".system("true")."\n";'
> prints: system:-1

When $SIG{CHLD} is set to "IGNORE", wait(2) will return -1 [1].  Since
system returns the status as provided by wait and wait isn't providing a
status I think the -1 return is reasonable.  Check $! when system
returns -1; in this case it will say "No child processes" (ECHILD).

The patch after my .sig addresses this in perlfunc.

[1] On Linux this is not true and wait(2) will ignore the IGNORE and
actually wait for the process to finish, returning the status and
pid.  I personally don't think perl should support this behaviour.

-- 
Rick Delaney
[EMAIL PROTECTED]


diff -ruN perl-current/pod/perlfunc.pod perl-current-dev/pod/perlfunc.pod
--- perl-current/pod/perlfunc.pod   2005-08-05 10:42:09.0 -0400
+++ perl-current-dev/pod/perlfunc.pod   2005-08-22 13:19:01.312460976 -0400
@@ -6017,6 +6017,8 @@
 the output from a command, for that you should use merely backticks or
 C, as described in L.  Return value of -1
 indicates a failure to start the program (inspect $! for the reason).
+It could also mean that you have set C< $SIG{CHLD} = 'IGNORE' >, in which
+case the C call would return -1 (inspect $!).
 
 Like C, C allows you to lie to a program about its name if
 you use the C syntax.  Again, see L.


[PATCH blead] Use SvGETMAGIC more often

2005-08-22 Thread Rick Delaney
The attached patch replaces some code with the equivalent macro.

-- 
Rick Delaney
[EMAIL PROTECTED]
diff -rpuN perl-current/doio.c perl-current-dev/doio.c
--- perl-current/doio.c 2005-08-10 05:41:12.0 -0400
+++ perl-current-dev/doio.c 2005-08-22 12:03:52.703777956 -0400
@@ -1308,8 +1308,7 @@ Perl_do_print(pTHX_ register SV *sv, Per
return TRUE;
 case SVt_IV:
if (SvIOK(sv)) {
-   if (SvGMAGICAL(sv))
-   mg_get(sv);
+   SvGETMAGIC(sv);
if (SvIsUV(sv))
PerlIO_printf(fp, "%"UVuf, (UV)SvUVX(sv));
else
diff -rpuN perl-current/pp.c perl-current-dev/pp.c
--- perl-current/pp.c   2005-08-06 12:23:11.0 -0400
+++ perl-current-dev/pp.c   2005-08-22 12:29:32.020914765 -0400
@@ -505,8 +505,8 @@ PP(pp_ref)
 const char *pv;
 SV * const sv = POPs;
 
-if (sv && SvGMAGICAL(sv))
-   mg_get(sv);
+if (sv)
+   SvGETMAGIC(sv);
 
 if (!sv || !SvROK(sv))
RETPUSHNO;
@@ -755,8 +755,7 @@ PP(pp_defined)
RETPUSHYES;
break;
 default:
-   if (SvGMAGICAL(sv))
-   mg_get(sv);
+   SvGETMAGIC(sv);
if (SvOK(sv))
RETPUSHYES;
 }
@@ -1384,8 +1383,7 @@ PP(pp_repeat)
   {
 register IV count;
 dPOPss;
-if (SvGMAGICAL(sv))
-mg_get(sv);
+SvGETMAGIC(sv);
 if (SvIOKp(sv)) {
 if (SvUOK(sv)) {
  const UV uv = SvUV(sv);
@@ -2223,8 +2221,8 @@ PP(pp_bit_and)
 dSP; dATARGET; tryAMAGICbin(band,opASSIGN);
 {
   dPOPTOPssrl;
-  if (SvGMAGICAL(left)) mg_get(left);
-  if (SvGMAGICAL(right)) mg_get(right);
+  SvGETMAGIC(left);
+  SvGETMAGIC(right);
   if (SvNIOKp(left) || SvNIOKp(right)) {
if (PL_op->op_private & HINT_INTEGER) {
  const IV i = SvIV_nomg(left) & SvIV_nomg(right);
@@ -2248,8 +2246,8 @@ PP(pp_bit_xor)
 dSP; dATARGET; tryAMAGICbin(bxor,opASSIGN);
 {
   dPOPTOPssrl;
-  if (SvGMAGICAL(left)) mg_get(left);
-  if (SvGMAGICAL(right)) mg_get(right);
+  SvGETMAGIC(left);
+  SvGETMAGIC(right);
   if (SvNIOKp(left) || SvNIOKp(right)) {
if (PL_op->op_private & HINT_INTEGER) {
  const IV i = (USE_LEFT(left) ? SvIV_nomg(left) : 0) ^ 
SvIV_nomg(right);
@@ -2273,8 +2271,8 @@ PP(pp_bit_or)
 dSP; dATARGET; tryAMAGICbin(bor,opASSIGN);
 {
   dPOPTOPssrl;
-  if (SvGMAGICAL(left)) mg_get(left);
-  if (SvGMAGICAL(right)) mg_get(right);
+  SvGETMAGIC(left);
+  SvGETMAGIC(right);
   if (SvNIOKp(left) || SvNIOKp(right)) {
if (PL_op->op_private & HINT_INTEGER) {
  const IV i = (USE_LEFT(left) ? SvIV_nomg(left) : 0) | 
SvIV_nomg(right);
@@ -2299,8 +2297,7 @@ PP(pp_negate)
 {
dTOPss;
const int flags = SvFLAGS(sv);
-   if (SvGMAGICAL(sv))
-   mg_get(sv);
+   SvGETMAGIC(sv);
if ((flags & SVf_IOK) || ((flags & (SVp_IOK | SVp_NOK)) == SVp_IOK)) {
/* It's publicly an integer, or privately an integer-not-float */
oops_its_an_int:
@@ -2376,8 +2373,7 @@ PP(pp_complement)
 dSP; dTARGET; tryAMAGICun(compl);
 {
   dTOPss;
-  if (SvGMAGICAL(sv))
- mg_get(sv);
+  SvGETMAGIC(sv);
   if (SvNIOKp(sv)) {
if (PL_op->op_private & HINT_INTEGER) {
  const IV i = ~SvIV_nomg(sv);
diff -rpuN perl-current/pp_ctl.c perl-current-dev/pp_ctl.c
--- perl-current/pp_ctl.c   2005-08-22 11:16:26.0 -0400
+++ perl-current-dev/pp_ctl.c   2005-08-22 12:33:56.412387458 -0400
@@ -1126,10 +1126,8 @@ PP(pp_flop)
 if (GIMME == G_ARRAY) {
dPOPPOPssrl;
 
-   if (SvGMAGICAL(left))
-   mg_get(left);
-   if (SvGMAGICAL(right))
-   mg_get(right);
+   SvGETMAGIC(left);
+   SvGETMAGIC(right);
 
if (RANGE_IS_NUMERIC(left,right)) {
register IV i, j;
@@ -1543,8 +1541,7 @@ PP(pp_dorassign)
RETURN;
break;
 default:
-   if (SvGMAGICAL(sv))
-   mg_get(sv);
+   SvGETMAGIC(sv);
if (SvOK(sv))
RETURN;
 }
diff -rpuN perl-current/pp_hot.c perl-current-dev/pp_hot.c
--- perl-current/pp_hot.c   2005-07-20 05:37:43.0 -0400
+++ perl-current-dev/pp_hot.c   2005-08-22 12:38:52.632212515 -0400
@@ -169,8 +169,7 @@ PP(pp_concat)
 }
 else { /* TARG == left */
 STRLEN llen;
-   if (SvGMAGICAL(left))
-   mg_get(left);   /* or mg_get(left) may happen here */
+   SvGETMAGIC(left);   /* or mg_get(left) may happen here */
if (!SvOK(TARG))
sv_setpvn(left, "", 0);
(void)SvPV_nomg_const(left, llen);/* Needed to set UTF8 flag */
@@ -350,8 +349,7 @@ PP(pp_dor)
RETURN;
break;
 default:
-   if (SvGMAGICAL(sv))
-   mg_get(sv);
+   SvGETMAGIC(sv);
if (SvOK(sv))
RETURN;
 }
@@ -2914,8 +2912,7 @@ PP(pp_aelem)
 void
 Perl_vivify_ref(pTHX_ SV *sv, U32 to_what)
 {
-   

Re: [perl #36967] Pod/Perldoc.pm bug with -m switch

2005-08-22 Thread Jim Cromie

Enrico Sorcinelli wrote:


On Sun, 21 Aug 2005 20:28:40 -0700
"Steve Peters via RT" <[EMAIL PROTECTED]> wrote:

Hi Steve,

 


[bepi - Sat Aug 20 15:45:51 2005]:

This is a bug report for perl from [EMAIL PROTECTED],
generated with the help of perlbug 1.35 running under perl v5.8.7.

Pod/Perldoc.pm adds also .pod extension (to perldoc argument) only if:

1) -m switch hasn't been specified

or

2) for 'pod/' or 'pods/' subdirectories (even if -m switch has been
specified).

Sincerely, I don't know if there's a directive and/or specification
and/or a
reason that suggests to put *.pod files (shipped in a distribution)
into a pod/
or pods/ subdirectory, but there are many CPAN modules that don't do
it! :-)

So for example:

%> perldoc -m perlboot

works well (in general with all core pods, since them lives under
pods/
directory), but:

%> perldoc -m lwpcook

doesn't work (with the last you must have LWP installed in your
system).

IMHO, 1) and 2) conditions are a nonsense together.

I've included a simple patch over Pod/Perldoc.pm 3.14 for checking
also .pod (indipendently from -m switch presence).

Regards

- Enrico

 

I'm not sure that this is a problem.  Looking at perldoc -h, 


   -m   Display module's file in its entirety

A POD file, is not, however, a module.  So, when I try "perldoc -m
lwpcook" it fails since no lwpcook.pm file exists.  
   




From the point of view of Pod/Perldoc.pm there's no differences between .pod or

.pm files or, more in general, between a generic file or Perl module.
For example, I can view the source of 'media.types' file shipped with LPW:

%> perldoc -m LWP::media.types

The bug (or 'strange' behaviour if you prefere) I've noted is that
Pod/Perldoc.pm adds .pod extension to perldoc argument only under certain (and,
in this case, inconsistent) circumstances and still I don't understand why.

 


I think the biggest reason is if you have both Foo.pm and Foo.pod
your previous patch (I think) will prefer Foo.pod, making Foo.pm 
unavailable.

this may also be reason for looking in pods/*


When I try "perldoc
-m lwpcook.pm", the file is found right away and displayed.  
   



Umh...

%> perldoc -m lwpcook.pm

doesn't work for me! Are you sure? There's not a lwpcook.pm file in my LPW
(5.803) installation. BTW, with Pod/Perldoc.pm 3.14 this cannot work at all.
There's not magical attempt to search for alternative extensions if that one
provided were not found (perhaps could be an idea...?).
Alternative extensions (.pod, .pm, .com, .bat and so one) are only *added* to
perldoc filename argument.

Regards

- Enrico

 


for me, most of these work:

[EMAIL PROTECTED] vref]$ perldoc lwpcook
[EMAIL PROTECTED] vref]$ perldoc lwpcook.pod
[EMAIL PROTECTED] vref]$ perldoc -m lwpcook
No module found for "lwpcook".
[EMAIL PROTECTED] vref]$ perldoc -m lwpcook.pod

as Steve suggested, -m is mostly for looking at the code (wo typing a path)
for that, the current behavior is ok.

if you want -m so you can see pod formatting tricks, then its inconvenient,
but with an easy workaround (add the .pod suffix)

given the larger problem of *.pod vs *.pm ambiguities/preferences with 
your patch,
Id be concerned about having the pm hidden from me, and my not even 
knowing it.




Re: [perl #36977] perl 5.8.7 Solaris Sparc compile error: no _ptr member in __FILE

2005-08-22 Thread Nicholas Clark
This is all we got:

On Mon, Aug 22, 2005 at 07:06:10AM -0700, Vahik Manookian wrote:
> # New Ticket Created by  "Vahik Manookian" 
> # Please include the string:  [perl #36977]
> # in the subject line of all future correspondence about this issue. 
> # https://rt.perl.org/rt3/Ticket/Display.html?id=36977 >
> 
> 
> This transaction appears to have no content

Did the body of a bug report go missing?

The subject line suggests that perl failed to compile, with some sort of error
about no _ptr member in __FILE

How did you run perl's Configure script? Did you pass it any command line
arguments to change the behaviour from the default?
If running it interactively did you accept the default answers when
prompted?

Nicholas Clark


Re: Documentation change for IPC::Open*.pm

2005-08-22 Thread Ben Tilly
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.

Ben
--- Open2.pm.orig	2005-08-13 10:56:53.022922352 -0700
+++ Open2.pm	2005-08-13 14:33:31.386870672 -0700
@@ -18,31 +18,31 @@
 
 use IPC::Open2;
 
-$pid = open2(\*RDRFH, \*WTRFH, 'some cmd and args');
+$pid = open2(\*CHLD_IN, \*CHLD_OUT, 'some cmd and args');
   # or without using the shell
-$pid = open2(\*RDRFH, \*WTRFH, 'some', 'cmd', 'and', 'args');
+$pid = open2(\*CHLD_IN, \*CHLD_OUT, 'some', 'cmd', 'and', 'args');
 
 # or with handle autovivification
-my($rdrfh, $wtrfh);
-$pid = open2($rdrfh, $wtrfh, 'some cmd and args');
+my($chld_in, $chld_out);
+$pid = open2($chld_in, $chld_out, 'some cmd and args');
   # or without using the shell
-$pid = open2($rdrfh, $wtrfh, 'some', 'cmd', 'and', 'args');
+$pid = open2($chld_in, $chld_out, 'some', 'cmd', 'and', 'args');
 
 =head1 DESCRIPTION
 
-The open2() function runs the given $cmd and connects $rdrfh for
-reading and $wtrfh for writing.  It's what you think should work 
+The open2() function runs the given $cmd and connects $chld_in for
+reading and $chld_out for writing.  It's what you think should work 
 when you try
 
 $pid = open(HANDLE, "|cmd args|");
 
 The write filehandle will have autoflush turned on.
 
-If $rdrfh is a string (that is, a bareword filehandle rather than a glob
+If $chld_in is a string (that is, a bareword filehandle rather than a glob
 or a reference) and it begins with C<< >& >>, then the child will send output
-directly to that file handle.  If $wtrfh is a string that begins with
-C<< <& >>, then $wtrfh will be closed in the parent, and the child will read
-from it directly.  In both cases, there will be a dup(2) instead of a
+directly to that file handle.  If $chld_out is a string that begins with
+C<< <& >>, then $chld_out will be closed in the parent, and the child will
+read from it directly.  In both cases, there will be a dup(2) instead of a
 pipe(2) made.
 
 If either reader or writer is the null string, this will be replaced
--- Open3.pm.orig	2005-08-13 10:56:56.625374696 -0700
+++ Open3.pm	2005-08-13 14:31:10.583276072 -0700
@@ -19,7 +19,7 @@
 
 =head1 SYNOPSIS
 
-$pid = open3(\*WTRFH, \*RDRFH, \*ERRFH,
+$pid = open3(\*CHLD_IN, \*CHLD_OUT, \*CHLD_ERR,
 		'some cmd and args', 'optarg', ...);
 
 my($wtr, $rdr, $err);
@@ -29,15 +29,17 @@
 =head1 DESCRIPTION
 
 Extremely similar to open2(), open3() spawns the given $cmd and
-connects RDRFH for reading, WTRFH for writing, and ERRFH for errors.  If
-ERRFH is false, or the same file descriptor as RDRFH, then STDOUT and 
-STDERR of the child are on the same filehandle.  The WTRFH will have
-autoflush turned on.
-
-If WTRFH begins with C<< <& >>, then WTRFH will be closed in the parent, and
-the child will read from it directly.  If RDRFH or ERRFH begins with
-C<< >& >>, then the child will send output directly to that filehandle.
-In both cases, there will be a dup(2) instead of a pipe(2) made.
+connects CHLD_OUT for reading from the child, CHLD_IN for writing to
+the child, and CHLD_ERR for errors.  If CHLD_ERR is false, or the
+same file descriptor as CHLD_OUT, then STDOUT and STDERR of the child
+are on the same filehandle.  The CHLD_IN will have autoflush turned
+on.
+
+If CHLD_IN begins with C<< <& >>, then CHLD_IN will be closed in the
+parent, and the child will read from it directly.  If CHLD_OUT or
+CHLD_ERR begins with C<< >& >>, then the child will send output
+directly to that filehandle.  In both cases, there will be a dup(2)
+instead of a pipe(2) made.
 
 If either reader or writer is the null string, this will be replaced
 by an autogenerated filehandle.  If so, you must pass a valid lvalue


Re: Documentation change for IPC::Open*.pm

2005-08-22 Thread Ben Tilly
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.

Ben


Re: Documentation change for IPC::Open*.pm

2005-08-22 Thread Rafael Garcia-Suarez
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 :)


[perl #36977] perl 5.8.7 Solaris Sparc compile error: no _ptr member in __FILE

2005-08-22 Thread Vahik Manookian
# New Ticket Created by  "Vahik Manookian" 
# Please include the string:  [perl #36977]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/rt3/Ticket/Display.html?id=36977 >


This transaction appears to have no content

[perl #36976] system() always returns -1 in forked child with SIG{CHLD}='IGNORE' in parent

2005-08-22 Thread via RT
# New Ticket Created by  Chris 
# Please include the string:  [perl #36976]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/rt3/Ticket/Display.html?id=36976 >


This is a bug report for perl from [EMAIL PROTECTED]
generated with the help of perlbug 1.35 running under perl v5.8.7.


-
[Please enter your report here]

Calls to system() in a forked child always return -1 if the parent has
set SIG{CHLD}='IGNORE'. I would expect/hope it to return 0.

Demonstrated by:
perl -e '$SIG{CHLD} = "IGNORE"; fork or sleep 0xbeef; print
"system:".system("true")."\n";'
prints: system:-1

Using a sub instead of "IGNORE" works as expected:
perl -e '$SIG{CHLD} = sub{}; fork or sleep 0xbeef; print
"system:".system("true")."\n";'
prints: system: 0

This result is consistent on centos4 and fedora core 2 and 3.

[Please do not change anything below this line]
-
---
Flags:
category=core
severity=medium
---
Site configuration information for perl v5.8.7:

Configured by chris at Mon Aug 22 16:34:25 EST 2005.

Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
  Platform:
osname=linux, osvers=2.6.9-11.elsmp, archname=i386-linux
uname='linux centos.local 2.6.9-11.elsmp #1 smp wed jun 8 17:54:20
cdt 2005 i686 i686 i386 gnulinux '
config_args='-ds -Doptimize=-O2 -pipe -m32 -march=i386
-mtune=pentium4 -Dcc=gcc -Duseshrplib -Duselargefiles -Dd_dosuid
-Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog
-Duseperlio -Ubincompat5005 -Dpager=/usr/bin/less -isr
-Dsiteprefix=/usr/local -Dinstallprefix=/usr/local -Dprefix=/usr/local
-Darchname=i386-linux -Dmyhostname=centos.local
[EMAIL PROTECTED] -Dccflags=-D_REENTRANT -D_GNU_SOURCE
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -Dcppflags=-D_REENTRANT
-D_GNU_SOURCE -fno-strict-aliasing -pipe -I/usr/local/include
-I/usr/include/gdbm'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
  Compiler:
cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2 -pipe -m32 -march=i386 -mtune=pentium4',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe
-I/usr/local/include -I/usr/include/gdbm -D_REENTRANT -D_GNU_SOURCE
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/local/include'
ccversion='', gccversion='3.4.3 20050227 (Red Hat 3.4.3-22.1)',
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, prototype=define
  Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.3.4.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.3.4'
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-rpath,/usr/local/lib/perl5/5.8.7/i386-linux/CORE'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:


---
@INC for perl v5.8.7:
/usr/local/lib/perl5/5.8.7/i386-linux
/usr/local/lib/perl5/5.8.7
/usr/local/lib/perl5/site_perl/5.8.7/i386-linux
/usr/local/lib/perl5/site_perl/5.8.7
/usr/local/lib/perl5/site_perl
.



Re: Documentation change for IPC::Open*.pm

2005-08-22 Thread Rafael Garcia-Suarez
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: [perl #36888] Error message says "filehandle" but should say "dirhandle"

2005-08-22 Thread Rick Delaney
On Mon, Aug 22, 2005 at 07:15:38AM -0700, Steve Peters via RT wrote:
> > [EMAIL PROTECTED] - Fri Aug 12 18:18:40 2005]:
> > plover% perl -wle '$x="pq"; print readdir $x'
> > Bad symbol for filehandle at -e line 1.
> > 
> > But it should be
> > 
> > Bad symbol for dirhandle at -e line 1.
> > 
> 
> A heuristic.  What does Klortho say about that...
> 
>   #11953 Of course, this is a heuristic, which is a fancy way of saying
> that it doesn't work.

I don't see this as a heuristic.

> This error message above comes from the following code in gv.c
> 
> GV *
> Perl_gv_IOadd(pTHX_ register GV *gv)
> {
> if (!gv || SvTYPE((SV*)gv) != SVt_PVGV)
> Perl_croak(aTHX_ "Bad symbol for filehandle");

This function could be modified to take an extra arg indicating whether
the warning should say "filehandle" or "dirhandle".

> if (!GvIOp(gv)) {
> #ifdef GV_UNIQUE_CHECK
> if (GvUNIQUE(gv)) {
> Perl_croak(aTHX_ "Bad symbol for filehandle (GV is unique)");
> }
> #endif
> GvIOp(gv) = newIO();
> }
> return gv;
> }
> 
> Unfortunately, it assumes all typeglobs are filehandles.  That means the
> following code works, well prints nothing at least, without warning.
> 
> perl -Mstrict -wle 'my $x="pq"; *X = $x; print readdir X'

If you want a warning here then it should be a different one because X
is not a bad symbol.  It should be more like

readdir() on unopened dirhandle

I'm not sure why readdir doesn't have this warning but I'm pretty sure
this has come up before.

-- 
Rick Delaney
[EMAIL PROTECTED]


Re: [perl #36967] Pod/Perldoc.pm bug with -m switch

2005-08-22 Thread Enrico Sorcinelli
On Sun, 21 Aug 2005 20:28:40 -0700
"Steve Peters via RT" <[EMAIL PROTECTED]> wrote:

Hi Steve,

> > [bepi - Sat Aug 20 15:45:51 2005]:
> > 
> > This is a bug report for perl from [EMAIL PROTECTED],
> > generated with the help of perlbug 1.35 running under perl v5.8.7.
> > 
> > Pod/Perldoc.pm adds also .pod extension (to perldoc argument) only if:
> > 
> > 1) -m switch hasn't been specified
> > 
> > or
> > 
> > 2) for 'pod/' or 'pods/' subdirectories (even if -m switch has been
> > specified).
> > 
> > Sincerely, I don't know if there's a directive and/or specification
> > and/or a
> > reason that suggests to put *.pod files (shipped in a distribution)
> > into a pod/
> > or pods/ subdirectory, but there are many CPAN modules that don't do
> > it! :-)
> > 
> > So for example:
> > 
> > %> perldoc -m perlboot
> > 
> > works well (in general with all core pods, since them lives under
> > pods/
> > directory), but:
> > 
> > %> perldoc -m lwpcook
> > 
> > doesn't work (with the last you must have LWP installed in your
> > system).
> > 
> > IMHO, 1) and 2) conditions are a nonsense together.
> > 
> > I've included a simple patch over Pod/Perldoc.pm 3.14 for checking
> > also .pod (indipendently from -m switch presence).
> > 
> > Regards
> > 
> > - Enrico
> > 
> 
> I'm not sure that this is a problem.  Looking at perldoc -h, 
> 
> -m   Display module's file in its entirety
> 
> A POD file, is not, however, a module.  So, when I try "perldoc -m
> lwpcook" it fails since no lwpcook.pm file exists.  

>From the point of view of Pod/Perldoc.pm there's no differences between .pod or
.pm files or, more in general, between a generic file or Perl module.
For example, I can view the source of 'media.types' file shipped with LPW:

%> perldoc -m LWP::media.types

The bug (or 'strange' behaviour if you prefere) I've noted is that
Pod/Perldoc.pm adds .pod extension to perldoc argument only under certain (and,
in this case, inconsistent) circumstances and still I don't understand why.

> When I try "perldoc
> -m lwpcook.pm", the file is found right away and displayed.  

Umh...

%> perldoc -m lwpcook.pm

doesn't work for me! Are you sure? There's not a lwpcook.pm file in my LPW
(5.803) installation. BTW, with Pod/Perldoc.pm 3.14 this cannot work at all.
There's not magical attempt to search for alternative extensions if that one
provided were not found (perhaps could be an idea...?).
Alternative extensions (.pod, .pm, .com, .bat and so one) are only *added* to
perldoc filename argument.

Regards

- Enrico


Re: [PATCH blead] Re: [perl #36959] List Constructor Operator - Undefined Values

2005-08-22 Thread Rafael Garcia-Suarez
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: [ANNOUNCE] Archive::Tar 1.25

2005-08-22 Thread Rafael Garcia-Suarez
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 C support loaded.
 
 Either C or C support is needed to support writing 
-stringified archives. Currently, C is the preffered method, if
+stringified archives. Currently, C is the preferred method, if
 available.
 
 See the C section to see how to change this preference.
@@ -1182,7 +1181,7 @@
 This requires C or higher, compiled with C 
 
 Either C or C support is needed to support writing 
-stringified archives. Currently, C is the preffered method, if
+stringified archives. Currently, C is the preferred method, if
 available.
 
 See the C 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] [-f ARCHIVE_FILE] FILE FILE ...
+ptar -x [-v] [-z] [-f ARCHIVE_FILE]
+

Re: ./perl -I lib -Dp -e '{package Dog}; my $spot = 0' 2> dogless

2005-08-22 Thread Rafael Garcia-Suarez
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.


./perl -I lib -Dp -e '{package Dog}; my $spot = 0' 2> dogless

2005-08-22 Thread Jim Cromie

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.


so I tried:
./perl -I lib -Dp -e '{package Dog}; my $spot = 0' 2> dogless
./perl -I lib -Dp -e '{package Dog}; my Dog $spot = 0' 2> dogfull

and diffd them.
only difference was hex-codes - no differences reported by -Dp.

I know that there is some difference inside,
else this would not fail:

mydog]$ ./perl -I lib -e 'my Dog $spot = 0'
No such class Dog at -e line 1, near "my Dog"
Execution of -e aborted due to compilation errors.


any hints ?


Re: Term::ANSIColor 1.10

2005-08-22 Thread Rafael Garcia-Suarez
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.
 


[perl #36888] Error message says "filehandle" but should say "dirhandle"

2005-08-22 Thread Steve Peters via RT
> [EMAIL PROTECTED] - Fri Aug 12 18:18:40 2005]:
> 
> 
> This is a bug report for perl from [EMAIL PROTECTED],
> generated with the help of perlbug 1.34 running under perl v5.8.0.
> 
> 
> -
> [Please enter your report here]
> 
> plover% perl -wle '$x="pq"; print readdir $x'
> Bad symbol for filehandle at -e line 1.
> 
> But it should be
> 
> Bad symbol for dirhandle at -e line 1.
> 

A heuristic.  What does Klortho say about that...

  #11953 Of course, this is a heuristic, which is a fancy way of saying
that it doesn't work.

This error message above comes from the following code in gv.c

GV *
Perl_gv_IOadd(pTHX_ register GV *gv)
{
if (!gv || SvTYPE((SV*)gv) != SVt_PVGV)
Perl_croak(aTHX_ "Bad symbol for filehandle");
if (!GvIOp(gv)) {
#ifdef GV_UNIQUE_CHECK
if (GvUNIQUE(gv)) {
Perl_croak(aTHX_ "Bad symbol for filehandle (GV is unique)");
}
#endif
GvIOp(gv) = newIO();
}
return gv;
}

Unfortunately, it assumes all typeglobs are filehandles.  That means the
following code works, well prints nothing at least, without warning.

perl -Mstrict -wle 'my $x="pq"; *X = $x; print readdir X'

It also means that, since there doesn't seem to be a way to distinguish
between filehandles and dirhandles, the following also runs without
warnings.

perl -Mstrict -wle 'open X, "foo"; print readdir X'




Re: [PATCH lib/CPAN.pm] Make curl follow redirects

2005-08-22 Thread Rafael Garcia-Suarez
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: Documentation change for IPC::Open*.pm

2005-08-22 Thread Rafael Garcia-Suarez
Ben Tilly wrote:
> 
> The attached patches clarify this by choosing filehandle names which
> are less prone to ambiguity.

They're empty.


Re: Building 25309 on VAX (OpenVMS 7.2) not ok

2005-08-22 Thread Rafael Garcia-Suarez
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.


Smoke [5.9.3] 25311 FAIL(XF) bsd/os 4.1 (i386/1 cpu)

2005-08-22 Thread kane
Automated smoke report for 5.9.3 patch 25311
fixit.xs4all.nl: Pentium II (i386/1 cpu)
onbsd/os - 4.1
using cc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
smoketime 3 hours 55 minutes (average 1 hour 57 minutes)

Summary: FAIL(XF)

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

   25311 Configuration (common) none
--- -
F F - - -Duse64bitint
O X - - 
| | | +- PERLIO = perlio -DDEBUGGING
| | +--- PERLIO = stdio  -DDEBUGGING
| +- PERLIO = perlio
+--- PERLIO = stdio


Failures: (common-args) none
[stdio/perlio] -Duse64bitint
../t/op/int.t...FAILED 11

[perlio] 
Inconsistent test results (between TEST and harness):
../lib/Net/hostent.tFAILED at test 4

-- 
Report by Test::Smoke v1.19_67 build 842 running on perl 5.00503
(Reporter v0.019 / Smoker v0.023)



Documentation change for IPC::Open*.pm

2005-08-22 Thread Ben Tilly
I've always been confused by this because I don't know if I'm supposed
to think about reading and writing from the point of view of the
parent process, or the child.  So I either have to do an experiment or
look up some old code where I used the API to figure it out.

The attached patches clarify this by choosing filehandle names which
are less prone to ambiguity.

Cheers,
Ben


Open2.diff
Description: Binary data


Open3.diff
Description: Binary data


Re: [ANNOUNCE] Archive::Tar 1.25

2005-08-22 Thread Jos I. Boumans


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.

--

Jos Boumans

Suicide is our way of saying to God:
"You can't fire me! I quit!"

CPANPLUShttp://cpanplus.sf.net



Storable portabilityproblems between Activestate and Linux

2005-08-22 Thread Jesse Eversole
I have an application that depends on Storeable.pm and it looks like 
Activestate 5.8.4 has a release of Storable that is incompatable with the 
latest version of Storable.pm on CPAN.  Is this true?  If so is there a way I 
can update my Linux distribution to be compatible with Activestate 5.8.4 
Storable?

Thanks,

Jesse Eversole
CTO MadTek, LLC
[EMAIL PROTECTED]




Smoke [5.9.0] 25311 FAIL(m) openbsd 3.6 (i386/1 cpu)

2005-08-22 Thread Steven P. Schubiger
Automated smoke report for 5.9.0 patch 25311
accognoscere.homeunix.org: AMD Athlon(TM) XP 1800+ ("AuthenticAMD" 686-class) 
(i386/1 cpu)
onopenbsd - 3.6
using cc version 2.95.3 20010125 (prerelease, propolice)
smoketime 3 minutes 2 seconds (average 22.750 seconds)

Summary: FAIL(m)

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

   25311 Configuration (common) none
--- -
m - m - 
m - m - -Duse64bitint
m - m - -Duseithreads
m - m - -Duseithreads -Duse64bitint
| | | +- PERLIO = perlio -DDEBUGGING
| | +--- PERLIO = stdio  -DDEBUGGING
| +- PERLIO = perlio
+--- PERLIO = stdio


-- 
Report by Test::Smoke v1.19#716 running on perl 5.8.5
(Reporter v0.016 / Smoker v0.015)



Re: 25309 does not compile

2005-08-22 Thread Andreas J. Koenig
> On Sun, 21 Aug 2005 12:02:37 +0100, Nicholas Clark <[EMAIL PROTECTED]> 
> said:

 nc> On Sat, Aug 20, 2005 at 10:14:28PM +0200, Andreas J. Koenig wrote:

 nc> I don't see this when I try a clean build of blead from rsync.

 nc> Moreover, I'm not sure how sv.c got changed, given that patch 25309 is 
solely
 nc> whitespace and solely in POSIX.xs:

 nc> [...]

 nc> I'm confused.

Yeah, I hope you saw my followup.

The reason is obvious now: I have lost the fourth bit of a byte in the
source code:

% perl -e '
printf "%b\n", ord("_");
printf "%b\n", ord("W");
'
101
1010111

Now this will be fun to reproduce:-0

-- 
andreas


Re: [ANNOUNCE] Archive::Tar 1.25

2005-08-22 Thread Rafael Garcia-Suarez
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 ',
ABSTRACT=> 'Manipulates TAR archives'