From: Gurusamy Sarathy Date: Mon, 24 Jan 2000 10:43:03 +0000 (+0000) Subject: fix typos; avoid use constant for lowercase constants (produces X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6570f7848406340d371b9f81689299e3b739279f;p=p5sagit%2Fp5-mst-13.2.git fix typos; avoid use constant for lowercase constants (produces warnings now) p4raw-id: //depot/perl@4874 --- diff --git a/ext/DB_File/Makefile.PL b/ext/DB_File/Makefile.PL index a247924..cac6578 100644 --- a/ext/DB_File/Makefile.PL +++ b/ext/DB_File/Makefile.PL @@ -16,7 +16,7 @@ WriteMakefile( VERSION_FROM => 'DB_File.pm', OBJECT => 'version$(OBJ_EXT) DB_File$(OBJ_EXT)', XSPROTOARG => '-noprototypes', - DEFINE => "$OS2", + DEFINE => $OS2 || "", ); sub MY::postamble { diff --git a/lib/Math/Complex.pm b/lib/Math/Complex.pm index 7f6e3bf..5b7ddb6 100644 --- a/lib/Math/Complex.pm +++ b/lib/Math/Complex.pm @@ -180,21 +180,21 @@ sub cplxe { # # The number defined as pi = 180 degrees # -use constant pi => 4 * CORE::atan2(1, 1); +sub pi () { 4 * CORE::atan2(1, 1) } # # pit2 # # The full circle # -use constant pit2 => 2 * pi; +sub pit2 () { 2 * pi } # # pip2 # # The quarter circle # -use constant pip2 => pi / 2; +sub pip2 () { pi / 2 } # # deg1 @@ -202,14 +202,14 @@ use constant pip2 => pi / 2; # One degree in radians, used in stringify_polar. # -use constant deg1 => pi / 180; +sub deg1 () { pi / 180 } # # uplog10 # # Used in log10(). # -use constant uplog10 => 1 / CORE::log(10); +sub uplog10 () { 1 / CORE::log(10) } # # i diff --git a/lib/Math/Trig.pm b/lib/Math/Trig.pm index 3a592b4..68dcb94 100644 --- a/lib/Math/Trig.pm +++ b/lib/Math/Trig.pm @@ -36,8 +36,8 @@ my @rdlcnv = qw(cartesian_to_cylindrical %EXPORT_TAGS = ('radial' => [ @rdlcnv ]); -use constant pi2 => 2 * pi; -use constant pip2 => pi / 2; +sub pi2 () { 2 * pi } # use constant generates warning +sub pip2 () { pi / 2 } # use constant generates warning use constant DR => pi2/360; use constant RD => 360/pi2; use constant DG => 400/360; diff --git a/lib/Shell.pm b/lib/Shell.pm index 706216a..62aa829 100644 --- a/lib/Shell.pm +++ b/lib/Shell.pm @@ -1,6 +1,6 @@ package Shell; use 5.005_64; -our($capture_stderr $VERSION); +our($capture_stderr, $VERSION); $VERSION = '0.2'; @@ -72,7 +72,7 @@ AUTOLOAD { for (\@arr) { s/"/\\\\"/g; s/\\\\\\\\"/\\\\\\\\"""/g; - \$_ = qq["\$_"] if /\s/; + \$_ = qq["\$_"] if /\\s/; } } else {