Re: RFC 14 (v2) Modify open() to support FileObjects and

2000-08-10 Thread Nathan Wiger
> Also, what if you write your own module, say "MyHttp", that you want to > open certain documents? How do you do this? The more general notation: > >open MyHttp, 'http://www.yahoo.com/', $custom, $args; Dangit! That first comma shouldn't be there (typo). Should say: open MyHttp 'http://

Re: RFC 14 (v2) Modify open() to support FileObjects and

2000-08-10 Thread Nathan Wiger
> This is nutso... shall we open->ssh and open->telnet and > open->any_protocal_under_the_sun in the core? Well, just because the hooks are there doesn't mean all the member modules have to be in core. The idea would be, as Tom Hughes suggests: > That is if the core provides a way for modules to

Re: RFC 14 (v2) Modify open() to support FileObjects and

2000-08-10 Thread Nathan Wiger
> How about this? > > open '/etc/passwd'; # file > open '/usr/local/bin/'; # directory (note the trailing '/') > open 'ftp://ftp.perl.org/'; # ftp > open 'http://www.yahoo.com/'; # http > open 'ldap://ldap.bigfoot.com/';# ldap I t

Line disciplines (was Re: RFC 69 (v3) Standardize input record separator)

2000-08-10 Thread Chaim Frenkel
I think a more generic approach would be thinking of it as a series of filters. With the :attributes being hints to the open of what to push on the filehandle. This would allow dynamic additino and removal of the filters while the filehandler were still active. The purely open approach would be

Re: RFC 69 (v3) Standardize input record separator (for

2000-08-10 Thread Bryan C . Warnock
On Thu, 10 Aug 2000, Perl6 RFC Librarian wrote: > Given this input file: > > D O S CR LF0044 004F 0053 000D 000A > U n i x LF0055 006E 0069 0078 000A > M a c CR 004D 0061 0063 000D > l i n e LS006C 0069 006E 0065 2028 > p a r a PS0070 0061 0072 0061 2

Re: RFC 69 (v3) Standardize input record separator (for

2000-08-10 Thread Chaim Frenkel
> "PRL" == Perl6 RFC Librarian <[EMAIL PROTECTED]> writes: PRL> =head1 ABSTRACT PRL> The default input record separator is not safe for all input files PRL> on all platforms. There should also be support for Unicode line PRL> separator (U+2028) and paragraph separator (U+2029). You want to

RFC 69 (v3) Standardize input record separator (for

2000-08-10 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Standardize input record separator (for portability) =head1 VERSION Maintainer: N. Hao Ching <[EMAIL PROTECTED]> Date: 10 Aug 2000 Version: 3 Mailing List: [EMAIL PROTECTED] Number: 69

Re: RFC 69 (v2) Standardize input record separator (for

2000-08-10 Thread Chaim Frenkel
I also think you are missing a point. The stdio library (or it's returns "\n" for the native line endings. The un-RFCed stdio replacement (sfio or a perl home grown one) might do the same. So... The correct line ending is "\n", you are adding an other line ending for the non-native version. I'd

Re: RFC 69 (v2) Standardize input record separator (for

2000-08-10 Thread Simply Hao
> But there is no way that I want under, any circumstance, _all_ > line endings active at the same time. Why not? Well, how about this proposal then? DOS, Mac, Unix: use newlines "\015\012", "\012", "\015"; OS/390: use newlines "\r", "\025"; Weird OS: use newlines "\t"; Someth

Re: RFC 69 (v2) Standardize input record separator (for

2000-08-10 Thread Chaim Frenkel
I completely disagree. How do you know that I want 5 lines. Perhaps I want only 3? You are assuming that within my file I will want all possible line endings to be line endings. That is simply not true. You might want to argue for the perl IO subsystem to intuit the line ending (note the singula

Re: RFC 14 (v2) Modify open() to support FileObjects and

2000-08-10 Thread Chaim Frenkel
What about native extensions? I think VMS (and the old TOPS10) had versions as part of the file name. Do URIs have this capablity? And what does a read of a directory return? URIs or Native? A job for binmode, err, readmode, or a line discipline? > "JSD" == Jonathan Scott Duff <[EMAIL P

Re: RFC 69 (v2) Standardize input record separator (for

2000-08-10 Thread Simply Hao
> Perl should provide the greatest ease for the greatest number of > people; and the majority of people reading text files are reading > platform-native text files. This was a big oversight on my part. Version 3 reflects this, which should be heading your way RSN. -Hao

Re: RFC 69 (v2) Standardize input record separator (for

2000-08-10 Thread John Porter
N. Hao Ching <[EMAIL PROTECTED]>: > > The default input record separator is not safe for all input files > on all platforms. There should also be support for Unicode line > separator (U+2028) and paragraph separator (U+2029). I disagree. Perl should provide the greatest ease for the greatest n

RFC 69 (v2) Standardize input record separator (for

2000-08-10 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Standardize input record separator (for portability) =head1 VERSION Maintainer: N. Hao Ching <[EMAIL PROTECTED]> Date: 10 Aug 2000 Version: 2 Mailing List: [EMAIL PROTECTED] Number: 69

Re: RFC 69 (v2) Standardize input record separator (for

2000-08-10 Thread Bart Lateur
On 10 Aug 2000 17:02:01 -, Perl6 RFC Librarian wrote: >The input record separator should match one of these (in UTF-8): > >000D 000A >000A >000D >2028 >2029 Just a technical correction: that is not UTF-8. That is plain and simply the hex representation of the ord of the 1

Re: RFC 69 (v1) Standardize input record separator (for

2000-08-10 Thread Simply Hao
> Has anyone taken on RFCing line disciplines? Working on it. Updating RFC 69 -Hao

Re: RFC 14 (v2) Modify open() to support FileObjects and

2000-08-10 Thread Bart Lateur
On 10 Aug 2000 08:35:18 +0100, Piers Cawley wrote: >> Allowing URI/URL syntax can perhaps dodge the "portability" issue >> URLs use / so if user thinks URL they think /. > >No! > >Yet more reasoned criticism from me eh? > >Seriously: Perl is not the web, the web is not perl And

Re: RFC 14 (v2) Modify open() to support FileObjects and

2000-08-10 Thread Piers Cawley
Tom Hughes <[EMAIL PROTECTED]> writes: > In message <[EMAIL PROTECTED]> > Tom Hughes <[EMAIL PROTECTED]> wrote: > > > The suggested syntax does not necessarily conflict with the > > above - the core might spot the xxx: scheme and try and load > > an xxx.pm from some well known path and

Re: RFC 14 (v2) Modify open() to support FileObjects and

2000-08-10 Thread Piers Cawley
Tom Hughes <[EMAIL PROTECTED]> writes: > In message <[EMAIL PROTECTED]> > Graham Barr <[EMAIL PROTECTED]> wrote: > > > On Wed, Aug 09, 2000 at 11:41:42AM -0500, Jonathan Scott Duff wrote: > > > > > open 'ftp://ftp.perl.org/'; # ftp > > > > What user/password does it use > > What

Re: RFC 14 (v2) Modify open() to support FileObjects and

2000-08-10 Thread Piers Cawley
Nick Ing-Simmons <[EMAIL PROTECTED]> writes: > Graham Barr <[EMAIL PROTECTED]> writes: > >On Wed, Aug 09, 2000 at 11:41:42AM -0500, Jonathan Scott Duff wrote: > >> How about this? > >> > >>open '/etc/passwd'; # file > > > >OK > > > >>open '/usr/local/bin/'; # director