>Paul J. Schinder (schinder@pjstoaster.pg.md.us) writes: >} Changing the subject to my() problems, with the greatest respect I think >} you are wrong that Brad Cox' problems lie in this area. The my() in his >} 'main' is local to the following print, so there is no chance MacPerl can >} forget it. There is also a my() in the subroutine 'time2str()' but that is >} also local to the subsequent 'printf', so that variable does not need to be >} 'remembered' outside the routine. >Maybe it's not the my bug in this case. I wasn't worried about "my" in >the main, or even "my" in the subroutines (although my'ed variables in >the subroutines can't be seen by anonymous subroutines defined in the >same subroutine, which causes problems because LWP uses anonymous >subroutines to read from sockets). I said this was probably the cause >because most problems of this type (having nulls returned when you >expect something back) with libwww-perl-5 are due to the my bug. Only >LWP::Protocol::file has to be hacked to any great extent because of >Unixisms; two other routines have to have a single path converted from >Unix to Mac format. Most of the rest of the changes I made were due to >MacPerl. Yes, I see. Though in the particular case of Date.pm the my() variables remain local to their routines, and there are no subroutines defined within those routines calling my() variables invisible to MacPerl. >I don't have a copy of the original 5b6 distribution any more, and I >may not have saved the original file (I saved most of them, but didn't >start doing so until several files into hacking). If @DoW and @MoY >(defined outside of any subroutine) were declared "my" in the original, >then Brad Cox's str2time(time2str(time)) will fail in MacPerl. If not, >then something else was wrong. Brad sent me e-mail saying that my >version worked for him, so I suspect that these might have been >declared "my @DoW = qw(...", etc., in the original, or maybe 5b7 (the >version that Brad said he tried) was the first version to use >$current_month and $current_year, which are declared my in 5b9 and >would be forgotten by MacPerl. In version 5b6, @DoW and @MoY are not my'ed, although the running variable $i used to create the %MoY hash is; to guard against a mix-up with any other $i lurking about presumably. >I'm *very* curious. You said yesterday that you're using 5b6? The >straight 5b6 distribution from Gisle Aas's site or from CPAN, or did >you fix it? And you can, say, do an http get with it, or MIME type a >file by extension? If so, this might be a significant clue about the >my bug, and it would be worth knowing tool or application and PPC or >68k. It was in fact from: ftp://bigblue.pvv.unit.no//store/store/ernie/libwww-perl/libwww-perl-5b6.tar.gz (where is 'no' -- nova-scotia perhaps). It ran with Brad's script with no alterations at all. Once I had got the library path right of course. I haven't done anything else with it yet. The interest was triggered by Brad's note. I am using the MacPerl 5.0.6 application on a Powerbook (68030 CPU): system 7.5.1 BTW. Alan