Leading::Zeros is a Perl module to defuse Perl's octal number representation.
SYNOPSIS
no Leading::Zeros;
my $answer = 042; # dies
This module offers some control over Perl's insidious "leading-zero-means-octal" notation.
INTERFACE
If the module is loaded via a no:
no Leading::Zeros;
then any subsequent attempt to use an integer constant with a leading zero, causes an exception to be thrown. The intention is to prevent you from doing so by accident.
If the module is loaded via a use, like so:
use Leading::Zeros;
then it silently pretends that any octal value (say, 042) was really a decimal value (i.e. 42).
If the module is loaded with the special -warning flag:
use Leading::Zeros -warning;
then octal numbers are treated as usual (i.e. as octals), but a warning is issued. See below.
Product's homepage
Requirements:
· Perl