diff options
Diffstat (limited to 'lib/Getopt/Std.pm')
-rw-r--r-- | lib/Getopt/Std.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Getopt/Std.pm b/lib/Getopt/Std.pm index 27882935f9..18b5739e92 100644 --- a/lib/Getopt/Std.pm +++ b/lib/Getopt/Std.pm @@ -27,6 +27,12 @@ switch name) to the value of the argument, or 1 if no argument. Switches which take an argument don't care whether there is a space between the switch and the argument. +Note that, if your code is running under the recommended C<use strict +'vars'> pragma, it may be helpful to declare these package variables +via C<use vars> perhaps something like this: + + use vars qw/ $opt_foo $opt_bar /; + For those of you who don't like additional variables being created, getopt() and getopts() will also accept a hash reference as an optional second argument. Hash keys will be x (where x is the switch name) with key values the value of |