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 think

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 (v3) Modify open() to support FileObjects and

2000-08-11 Thread Nathan Wiger
# Open a remote webpage $http = open http "http://www.perl.com/", GET; ^ 1) The URL says that it's a http resource, so why do we have to tell open to use a http handler? a) Allows custom handlers: open myhttp

Re: Internal Filename Representations (was Re: Summary of I/O related RFCs)

2000-08-13 Thread Nathan Wiger
And how do we make it easy to pass in a name to open? In an email I sent to Jarkko off-list, I suggested this: If we embedded full URI support into Perl, then people could write portable scripts using URIs, or non-portable ones using native syntax. *Internally*, both could be converted into

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

2000-08-14 Thread Nathan Wiger
What does that mean? When the handler is invoked, what does it see? $fh = open myhttp "http://www.perl.com", "fred", "barney"; Does that result in a call like this? myhttp::open("http://www.perl.com", "fred", "barney"); Exactly. Or to be "more correct"

Re: RFC 100 (v1) Embed full URI support into Perl

2000-08-15 Thread Nathan Wiger
Sam Tregar wrote: How is this better than File::Spec's approach? File::Spec has the idea and representation dead on. However, the interface is a pain; to write portable scripts you have to go through some contortions. With URI support, you still have to contort a little, but not as much.

Re: RFC 100 (v1) Embed full URI support into Perl

2000-08-16 Thread Nathan Wiger
So, what's so portable about file:// URLs again? How do they magically know that //c/ means / on UNIX? What do they do with //z/? This is only one example. I'm not sure it's the best way. It's definitely not the only way. Chaim asked: Or for that matter "file://u/frankeh/Projects" become?

Re: RFC 30 (v2) STDIN, STDOUT, and STDERR should be renamed

2000-08-16 Thread Nathan Wiger
Graham Barr wrote: Create a new handle, like $DEFOUT. Then there would be no need for selectsaver either as you would do the equiv. of local($DEFOUT) = $newhandle; Just submitted an RFC on this exact idea. -Nate

Re: RFC 181 (v1) Formats out of core / New format syntax

2000-09-01 Thread Nathan Wiger
Have you also looked at Damian's Text::Autoformat, which has a renewed format implementation that looks *very* good a candidate for replacing perl 4/5's format. Yes, I have. It's actually very powerful. I've actually been meaning to talk to Damian about this, because at one time he had

Re: RFC 39 (v3) Perl should have a print operator

2000-09-05 Thread Nathan Wiger
Jon Ericson wrote: I would want it to return @items: @sorted = sort print @items; I'd prefer a different name (tee?) and keep print as it is. Pretty much all the stuff being discussed right now can be stuck in a module: package Print::Variations; use Exporter; @EXPORT =

Internal Filename Representations (was Re: Summary of I/O related RFCs)

2000-08-11 Thread Nathan Wiger
[cc'ed on internals as FYI] =item 36 (v1): Structured Internal Representation of Filenames I think this should be discussed a good amount. I think URIs are cool, but too much trouble for simple stuff. I don't want to have to write "file:///etc/motd" everytime I want to address a file. Too

Standardization of Perl IO functions

2000-09-12 Thread Nathan Wiger
All- This is an idea I've been chewing on for some time. RFC 14 proposes a new syntax to open(): $FH = open dir "/usr/local/bin" or die "Badness: $!"; which is far different from the current open(). This is actually a more flexible and consistent syntax, with a cool feature I just came

Re: Cross-referencing RFC 186 with RFC 183 and RFC 79

2000-09-14 Thread Nathan Wiger
Glenn Linderman wrote: I have a number of scripts that use this sort of facility, using push/shift to populate/read the array "file". These could be made simpler and more general by wrapping the array as a file. Perhaps the open "handler" stuff could be used to implement this?

Sublist -io RFC wrap-up time

2000-09-16 Thread Nathan Wiger
[ for those on -all or -objects this is gonna look real familiar :-) ] All- As Nat has mentioned on -meta, it's time to start wrapping things up. In particular, I think the following "deadlines" should apply: 1. Any and all *new* RFC's should be submitted by Wednesday at the absolute

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

2000-09-17 Thread Nathan Wiger
Michael G Schwern wrote: On Sun, Sep 17, 2000 at 05:35:47AM -, Perl6 RFC Librarian wrote: $fo-untaint - Removes tainting from that data source I can guarantee this will be abused and severely water down the utility of taint mode. Well, as Tom pointed out to me this already

Re: RFC 30 (v4) STDIN, STDOUT, STDERR, ARGV, and DATA should become scalars

2000-09-17 Thread Nathan Wiger
Tom Christiansen wrote: Scalars hold references to objects. Filehandles should, ultimately, be objects, as should directory handles. I haven't yet seen anybody yet propose bifurcating {file,directory}handles. This would certainly be nice. If I'm understanding what you mean, I believe

Re: RFC 100 (v2) Embed full URI support into Perl

2000-09-18 Thread Nathan Wiger
I'd rather see you drop (or footnote) the discussion of how the various systems are going to map content among themselves, and focus more on what the construct allows. For instance, returning to some of the original implementation ideas, that the location information be passed to the

The One True Deadline is approaching

2000-09-28 Thread Nathan Wiger
We've only got 4 days left until the One True Deadline on this whole thing. Please, go check this out: http://dev.perl.org/rfc/overdue-perl6-language-io.html And get your RFC's finished up. Remember: Oct 1st is a true deadline, coming from the powers above, meaning if your RFC is not frozen by

Re: RFC 350 (v1) Advanced I/O (AIO)

2000-09-29 Thread Nathan Wiger
you would do: $sock = AIO::Open( Host = 'www.perl.org', Port = 80 ) ; Similarly for LWP you would just do: $sock = AIO::Open( Url = 'http://www.perl.org' ) ; $event = AIO::Open( Host = 'www.perl.org', Port