summaryrefslogtreecommitdiff
path: root/lib/sbin/CSTUtils.pl
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-10-24 22:55:51 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-10-24 22:55:51 +0000
commit9bf28bf5ac1cb628ed935d4498694a7482b32de0 (patch)
tree22276e1a378652895917eada7c89dce2c1144319 /lib/sbin/CSTUtils.pl
parent3b0a0ea158df599e3fd87ab5100bf8e4344b322b (diff)
Changed to use Perl5 stuff...
local -> my used perl 5 references for passing databases around in the CST. CST is now about a factor of 16 faster ! Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1101 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/CSTUtils.pl')
-rw-r--r--lib/sbin/CSTUtils.pl20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/sbin/CSTUtils.pl b/lib/sbin/CSTUtils.pl
index 3c79d096..ea83787f 100644
--- a/lib/sbin/CSTUtils.pl
+++ b/lib/sbin/CSTUtils.pl
@@ -11,7 +11,7 @@
sub CST_error
{
- local($level,$mess,$line,$file) = @_;
+ my($level,$mess,$line,$file) = @_;
if ($full_warnings)
{
@@ -61,9 +61,9 @@ sub CST_error
sub read_file
{
- local($file) = @_;
- local(@indata);
- local($line);
+ my($file) = @_;
+ my(@indata);
+ my($line);
open(IN, "<$file") || die("Can't open $file\n");
@@ -121,10 +121,10 @@ sub read_file
sub chompme
{
- local($in) = @_;
+ my($in) = @_;
$lastchar = chop($in);
- if ($lastchar == "\n")
+ if ($lastchar eq "\n")
{
return $_;
}
@@ -150,8 +150,8 @@ sub chompme
sub WriteFile
{
- local ($filename,$data) = @_;
- local ($data_in);
+ my ($filename,$rdata) = @_;
+ my ($data_in);
# Read in file
$data_in = "";
@@ -164,11 +164,11 @@ sub WriteFile
}
}
- if ($data ne $data_in)
+ if ($$rdata ne $data_in)
{
# print "Creating new file $filename\n";
open(OUT, ">$filename") || die("Can't open $filename\n");
- print OUT $data;
+ print OUT $$rdata;
close OUT;
}