Locale-Sensitive Perl Method
my ($dev, $inode, $mode, $nlink, $uid, $gid, $rdev,
$size, $atime, $mtime, $ctime, $blksize, $blocks) = lstat($filename);
Internationalization (I18n) Method Overview
The lstat function is used to stat symbolic links. Like stat, it returns a 13-element list of
file status indicators.
See perl's lstat function documentation and
perlunicode for
additional details.
I18n Issues
Perl does attempt to resolve Unicode text input to the lstat function. The input is instead
provided as bytestrings. The proper encoding for strings passed to this function may be dependent on the
operating and file system(s). For example, Unicode may or may not be allowed in file names. And the
exact Unicode encoding may differ on different platforms ('UTF-8', 'UTF-16 Big Endian', etc.).
Whether lstat constitutes an i18n issue will depend on its usage in the application,
and what architecture it can be expected to run on.
Suggested Replacement
Use care when providing byte-strings to lstat . Double check that the provided argument(s)
will be tuned for the correct system architecture and encoding.
Globalyzer will detect this function and report it as an i18n issue. If you have determined that the call
is being handled correctly, you can use Globalyzer's Ignore Comment functionality to ensure that it
isn't picked up in a subsequent scan.
Locale-Sensitive Perl Methods
|