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

Re: [MacPerl] More on the lack of path handling routines



Matthias Ulrich Neeracher <neeri@iis.ee.ethz.ch> writes:
} 
} Since I'm currently doing military service, I didn't have much time to
} get involved in discussions on the mailing list, so here's a few thoughts
} on this thread:

After reading your article in the Perl Journal, all I can say is thank
God for universal military service (in someone else's country, of
course :-))  You may not feel the same :-)

}  
}  - Scott's remark about the lack of a path handling library is absolutely
}    correct, and noted as such. As far as I know, Kenneth Albanowski and/or
}    Charles Bailey are working on such a library.
}  - His point about line terminators in the parser was well taken. I've 
}    inspected the perl sources to see what it would take to make the perl
}    parser recognize all end of line styles (CR, LF, CRLF), but with the 
}    current I/O architecture, that's not possible in an efficient way.
}    Perl will soon switch to an sfio based architecture, and then, this project
}    is worth another look.
}  - Intuiting the OS from directory tests, as Daniel suggests, is somewhat too
}    risky (one day you might meet a freak Mac with a directory named "/") and 
}    not necessary anyway: Just use the $^O variable. 

I used to name floppy disks with a / (/1, /2, etc.), and there are
files like the "read/write OSAX".  But I think part of this discussion
has taken the wrong tack.  There's need for standard path handling
routines, but there's no need for portable ones that autodetect
architectures.  What I have in mind is something like what you've done
with File::Basename, where it functions with Mac paths exactly like the
Unix File::Basename functions with Unix paths.  I don't expect to be
able to copy File::Basename from my Mac to my Sun (or vice versa) and
have it work.  All I expect is that basename() give me the right result
for the archtecture I'm using, and since File::Basename is in the
standard distribution, I can use it without worry that it won't exist.
But the key is to get the routines into the standard Perl 5
distribution, and to write the routines so they do the "right" thing for
each architecture.

} 
} I've made a lot of progress over the weekend. Expect considerable improvements
} in the Help system RSN.
} 
} Matthias
} 
} -----
} Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
}   "Then anyone who leaves behind him a written manual, and likewise
}    anyone who receives it, in the belief that such writing will be
}    clear and certain, must be exceedingly simple-minded..."
}                                                 -- Plato, _Phaedrus_
} 
---
--------
Paul J. Schinder
NASA Goddard Space Flight Center,
Code 693, Greenbelt, MD 20771 USA
schinder@pjstoaster.pg.md.us