A safer version of IO #28

Open
frioux opened this Issue Jan 20, 2014 · 0 comments

Projects

None yet

1 participant

Collaborator
frioux commented Jan 20, 2014

I like IO::All and I want to use it in perl5i to solve a lot of Perl's
IO issues. Trouble is io() is a bit too smart and will do ambiguous and
insecure things like try to open URLs and pipes and sockets and let me
call any IO::All method with "method:"

So I would like a safer, less ambiguous io(). One that only opens files
and directories and filehandles and will never try to open a socket.
You can still explicitly ask for all that with io->blah($thing).
IO::All::Safer, for example.

You can see my way of sanitizing io() in perl5i here.
http://github.com/schwern/perl5i/blob/83ea6096ab2714a16913893257dd55d58fe39c1b/lib/perl5i/IO.pm

(imported from https://rt.cpan.org/Ticket/Display.html?id=47175)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment