summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-01-24 10:43:03 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-01-24 10:43:03 +0000
commit6570f7848406340d371b9f81689299e3b739279f (patch)
tree433c3efc96acdebf51bcb7ce00976ca7e398b8cf /lib
parent548da3d2226362a0902abd52eeecaeeaccb0a978 (diff)
downloadperl-6570f7848406340d371b9f81689299e3b739279f.tar.gz
fix typos; avoid use constant for lowercase constants (produces
warnings now) p4raw-id: //depot/perl@4874
Diffstat (limited to 'lib')
-rw-r--r--lib/Math/Complex.pm10
-rw-r--r--lib/Math/Trig.pm4
-rw-r--r--lib/Shell.pm4
3 files changed, 9 insertions, 9 deletions
diff --git a/lib/Math/Complex.pm b/lib/Math/Complex.pm
index 7f6e3bfe38..5b7ddb6f2c 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 3a592b47c4..68dcb94822 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 706216a8e5..62aa82964c 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 {