Bug 2505 : use warnings in smart_rules.pl
authorColin Campbell <colin.campbell@ptfs-europe.com>
Tue, 7 Jun 2011 13:34:18 +0000 (14:34 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 10 Apr 2012 09:30:20 +0000 (11:30 +0200)
Fix some careless code redeclaring a variable
declaring a variable in a condition
so that these don't generate errors

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
admin/smart-rules.pl

index 0b8012f..8e5a2d5 100755 (executable)
@@ -18,7 +18,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 use strict;
-#use warnings; FIXME - Bug 2505
+use warnings;
 use CGI;
 use C4::Context;
 use C4::Output;
@@ -28,7 +28,7 @@ use C4::Debug;
 use C4::Branch; # GetBranches
 use C4::Dates qw/format_date format_date_in_iso/;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $dbh = C4::Context->dbh;
 
 # my $flagsrequired;