> Well, sure, but that's precisely what the C<is> operator was intended
> to do in the first place. I don't know why Damian used a dot there.
> I'd also expect that construct to return the old value of irs. The
> dot snuck into the last draft of E3 and I didn't read it with enough of
> my brain to catch it.
I changed it after this exchange between us:
| > : sub save_data ( %data) {
| > : foreach my($filename, $data) (%data) {
| > : my $rest = <$data.{fh} is IRS(undef)>
| >
| > I think this "is" is also misplaced. It should generally
| > be done once on the filehandle when it is opened, not on
| > every input.
|
| Huh???
|
| It *can't* be.
|
| When I opened $data.{fh}, I read in four lines -- relying on
| IRS's default newline value. Now I want to suck up the rest of
| the file, so I reset IRS to C<undef>. Many other input protocols
| rely on being able to change IRS on-the-fly too.
|
| I can see that IRS should maybe be a method of the filehandle object:
|
| $data.{fh}.IRS(undef);
| my $rest = <$data.{fh}>
|
| or, better still:
|
| my $rest = <$data.{fh}.IRS(undef)>
After which I mistakenly took your silence for consent
(instead of overwhelmedness ;-)
I'll have the Perl Ministry of Truth rewrite it retroactively, shall I?
> There is still some debate over whether "is" is the correct spelling of
> that operator, but I wouldn't hold out a lot of hope for C<...> in its
> place. I have other ideas for C<...> more in line with its usual
> interpretation of "something omitted here", so I'm holding it reserve.
I agree. *Many* people I've spoken too are hoping C<...> will be the
"yada yada yada" operator! ;-)
Damian