[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] MacPerl5 and libwww-perl-5b7




Alan Fry <ajf@afco.demon.co.uk> writes:
[snip]
} 
} Two things leave me uneasy. Why the '::'? I thought '::' was the
} 'preferred' way of referring to a packaged variable: i.e '$thing' in
} 'package MyParcel' would be known elsewhere as '$MyParcel::thing' rather
} than '$MyParcel'thing'. (Somebody wryly said somewhere that that was to
} make C programmers feel they knew what they were doing.) But '::' has a
} deeper significance?

I don't know.  This I just picked up from seeing it used this way.  I
printed out the complete Perl docs last week 4 up and it still ran 90
or so pages. Somewhere in that 360 page document (or in the equivalent
HTML files Matthias gives us) he answer probably lies.

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

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.

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.

[snip]
} 
} Kind regards,
} 
} Alan
} 
} 
} 
---
--------
Paul J. Schinder
NASA Goddard Space Flight Center,
Code 693, Greenbelt, MD 20771 USA
schinder@pjstoaster.pg.md.us