Quell 7 warnings: "my" variable $irule masks earlier declaration in same scope.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Joe Atzberger 2008-04-08 09:50:19 -05:00 committed by Joshua Ferraro
parent fa9a411a2f
commit d1601b26a6

View file

@ -1112,37 +1112,38 @@ sub GetIssuingRule {
my ( $borrowertype, $itemtype, $branchcode ) = @_;
my $dbh = C4::Context->dbh;
my $sth = $dbh->prepare( "select * from issuingrules where categorycode=? and itemtype=? and branchcode=? and issuelength is not null" );
my $irule;
$sth->execute( $borrowertype, $itemtype, $branchcode );
my $irule = $sth->fetchrow_hashref;
$irule = $sth->fetchrow_hashref;
return $irule if defined($irule) ;
$sth->execute( $borrowertype, $itemtype, "*" );
my $irule = $sth->fetchrow_hashref;
$irule = $sth->fetchrow_hashref;
return $irule if defined($irule) ;
$sth->execute( $borrowertype, "*", $branchcode );
my $irule = $sth->fetchrow_hashref;
$irule = $sth->fetchrow_hashref;
return $irule if defined($irule) ;
$sth->execute( "*", $itemtype, $branchcode );
my $irule = $sth->fetchrow_hashref;
$irule = $sth->fetchrow_hashref;
return $irule if defined($irule) ;
$sth->execute( $borrowertype, "*", "*" );
my $irule = $sth->fetchrow_hashref;
$irule = $sth->fetchrow_hashref;
return $irule if defined($irule) ;
$sth->execute( "*", "*", $branchcode );
my $irule = $sth->fetchrow_hashref;
$irule = $sth->fetchrow_hashref;
return $irule if defined($irule) ;
$sth->execute( "*", $itemtype, "*" );
my $irule = $sth->fetchrow_hashref;
$irule = $sth->fetchrow_hashref;
return $irule if defined($irule) ;
$sth->execute( "*", "*", "*" );
my $irule = $sth->fetchrow_hashref;
$irule = $sth->fetchrow_hashref;
return $irule if defined($irule) ;
# if no rule matches,