Skip Menu |

This queue is for tickets about the File-Open CPAN distribution.

Report information
The Basics
Id: 90041
Status: rejected
Priority: 0/
Queue: File-Open

People
Owner: Nobody in particular
Requestors: PERRETTDL [...] cpan.org
Cc: perrettdl [...] googlemail.com
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: perrettdl [...] googlemail.com
Subject: Features
It would be nice not to have to remember that fopen differs from open in that fopen $filename, '<:encoding(UTF-8)'; # is not allowed fopen $filename, '<',':encoding(UTF-8)'; # you need to do this instead Would it be possible for fopen (et al.) recognise layers in the second parameter?
On Mon Nov 04 09:09:01 2013, PERRETTDL wrote: Show quoted text
> It would be nice not to have to remember that fopen differs from open > in that > > fopen $filename, '<:encoding(UTF-8)'; # is not allowed > fopen $filename, '<',':encoding(UTF-8)'; # you need to do this instead > > Would it be possible for fopen (et al.) recognise layers in the second > parameter?
I don't like that idea. It crams two logically distinct values (open mode, I/O layers) in a single argument. And then fopen would have to parse a string to separate the two again. It's the same reason why 2-arg open is worse than 3-arg open. So I'm going to reject this suggestion. Sorry.