diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-07-21 15:15:42 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-07-22 21:31:42 -0400 |
commit | 338aa8b061f430c2b3d9deaeed0aec523639aff7 (patch) | |
tree | 701139243fc4530fa33e0e4e53bbf5d4d6005632 /pod/perlhacktips.pod | |
parent | 999448781bc711c8732271b98a45a724f7357c46 (diff) | |
download | perl-338aa8b061f430c2b3d9deaeed0aec523639aff7.tar.gz |
Document grok_atou as strtoul replacement.
Diffstat (limited to 'pod/perlhacktips.pod')
-rw-r--r-- | pod/perlhacktips.pod | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pod/perlhacktips.pod b/pod/perlhacktips.pod index 1d8aa1975c..3d477da89e 100644 --- a/pod/perlhacktips.pod +++ b/pod/perlhacktips.pod @@ -629,7 +629,15 @@ Do not use atoi() Use grok_atou() instead. atoi() has ill-defined behavior on overflows, and cannot be used for incremental parsing. It is also affected by locale, -which can be construed as a bug. +which is bad. + +=item * + +Do not use strtol() or strtoul() + +Use grok_atou() instead. strtol() or strtoul() (or their IV/UV-friendly +macro disguises, Strtol() and Strtoul(), or Atol() and Atoul() are +affected by locale, which is bad. =back |