[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [889] trunk/LedgerSMB.pm



Revision: 889
          http://svn.sourceforge.net/ledger-smb/?rev=889&view=rev
Author:   einhverfr
Date:     2007-03-12 22:17:23 -0700 (Mon, 12 Mar 2007)

Log Message:
-----------
LedgerSMB.pm now uses strict

Modified Paths:
--------------
    trunk/LedgerSMB.pm

Modified: trunk/LedgerSMB.pm
===================================================================
--- trunk/LedgerSMB.pm	2007-03-13 02:00:42 UTC (rev 888)
+++ trunk/LedgerSMB.pm	2007-03-13 05:17:23 UTC (rev 889)
@@ -35,6 +35,7 @@
 
 use Math::BigFloat lib=>'GMP';
 use LedgerSMB::Sysconfig;
+use strict;
 
 package LedgerSMB;
 
@@ -366,11 +367,11 @@
 		$argstr .= "?, ";
 	}
 	$argstr =~ s/\, $//;
-	$query = "SELECT * FROM $procname()";
+	my $query = "SELECT * FROM $procname()";
 	$query =~ s/\(\)/($argstr)/;
 	my $sth = $self->{dbh}->prepare($query);
 	$sth->execute(@_);
-	while (my $ref = $sth->fetchrow_hashref(NAME_lc)){
+	while (my $ref = $sth->fetchrow_hashref('NAME_lc')){
 		push @results, $ref;
 	}
 	@results;
@@ -380,6 +381,7 @@
 
 	my ($self, $myconfig, $date, $picture) = @_;
 
+	my ($yy, $mm, $dd);
 	if ($date && $date =~ /\D/) {
 
 		if ($myconfig->{dateformat} =~ /^yy/) {
@@ -423,7 +425,7 @@
 	my $sth = $self->{dbh}->prepare($query);
 	$sth->execute;
 	my $ref;
-	while ($ref = $sth->fetchrow_hashref(NAME_lc)){
+	while ($ref = $sth->fetchrow_hashref('NAME_lc')){
 		push @{$self->{custom_db_fields}{$ref->{extends}}},
 			$ref->{field_def};
 	}
@@ -434,7 +436,7 @@
 	my ($self, $myconfig) = @_;
 
 	# connect to database
-	$dbh = DBI->connect($myconfig->{dbconnect}, $myconfig->{dbuser}, $myconfig->{dbpasswd}, {AutoCommit => 0}) or $self->dberror;
+	my $dbh = DBI->connect($myconfig->{dbconnect}, $myconfig->{dbuser}, $myconfig->{dbpasswd}, {AutoCommit => 0}) or $self->dberror;
 
 	# set db options
 	if ($myconfig->{dboptions}) {
@@ -456,6 +458,7 @@
 	}
 
 	my $i = 0;
+	my $j;
 	# fill rows
 	foreach my $item (sort { $a->{num} <=> $b->{num} } @ndx) {
 		$i++;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.