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

Re: [MacPerl] find.pl and wanted



Hal wrote in response to my comments:

>> Now that I think of it, the interface in find.pl is just poor anyway.
>> Why isn't the information that is passed in $_, $name, and $dir passed
>> via the @_ argument list?

>It was probably a speed consideration, as find.pl was originally
>written for the automated find2perl, which always generated a
>"correct" wanted function.

Make sense, just like custom sort subroutine's $a and $b.

>>                           At first I was thinking that it was a
>> backwards compatiblity thing, since earlier perls did not have local()

>Err, Perl 4 certainly had local(), 

I'm talking earlier than perl 4. A few weeks back someone was asking
about the difference between various versions of perl, and I grabbed a
copy of the first public perl release from a comp.sources.unix
archive. (I also found perl2 and perl3, but I didn't get a chance to
take a look at them.) It didn't have local(), and there was a comment
in the man page that later versions may allow recursive subroutines.
Maybe I should check whether local() was added to perl 2 or 3. (I
remember that perl1 did contain some {something}2perl scripts, but I
don't remember whether find2perl was one. It seems like it would be
difficult to write without recursion.)
-- 
Andrew Langmead