fix typos; avoid use constant for lowercase constants (produces
authorGurusamy Sarathy <gsar@cpan.org>
Mon, 24 Jan 2000 10:43:03 +0000 (10:43 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Mon, 24 Jan 2000 10:43:03 +0000 (10:43 +0000)
warnings now)

p4raw-id: //depot/perl@4874

ext/DB_File/Makefile.PL
lib/Math/Complex.pm
lib/Math/Trig.pm
lib/Shell.pm

index a247924..cac6578 100644 (file)
@@ -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 {
index 7f6e3bf..5b7ddb6 100644 (file)
@@ -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
index 3a592b4..68dcb94 100644 (file)
@@ -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;
index 706216a..62aa829 100644 (file)
@@ -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 {