David Nicol

NAME

ARGV::readonly - make <> open files regardless of leading/trailing whitespace and/or control characters such as |, >, amd <.

SYNOPSIS

this module allows

  use ARGV::readonly;
  while(<>){
       ...

to be safer in hostile environments where one is bullheaded enough to give * as the command line argument. See rants on P5P from July, 2008.

DESCRIPTION

the code is shorter than the documentation. Please look at it.

EXPORT

None by default.

TO DO

ideally a suite of ARGV::* modules will appear, each doing their little thing, in a way that they won't stomp on each other's toes. This module has no exclusion interface or anything, so an @ARGV modifier that, for instance, preprocesses *.gz into "gunzip -c $_ |" is either going to have to undo the mods made here or be incompatible.

HISTORY

0.01

modified suggestion made by Tom Christiansen in Message-ID: <24692.1217339882@chthon>

SEE ALSO

Encode::Argv

July 2008 perl5 porters archive

AUTHOR

furtively assembled by David Nicol <davidnico@cpan.org>

COPYRIGHT AND LICENSE

This module is hereby placed in the public domain.




Hosting generously
sponsored by Bytemark