Bug 6679 :[SIGNED-OFF] members dir now passes perlcritic tests
authorChris Cormack <chrisc@catalyst.net.nz>
Thu, 5 Apr 2012 02:43:20 +0000 (14:43 +1200)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 10 Apr 2012 11:44:53 +0000 (13:44 +0200)
signed-off-by Jonathan Druart <jonathan.druart@biblibre.com>

members/member-picupload.pl
members/member.pl
t/00-testcritic.t

index 7e5aad8..75bbea4 100755 (executable)
@@ -59,13 +59,13 @@ if ($photo){
 
        my $filename=$borrowernumber.'.jpg';
        my $upload_filehandle = $input->upload("photo");
-       open UPLOADFILE, ">$upload_dir/$filename";
-       binmode UPLOADFILE;
+    open (my $upload_fh, '>', "$upload_dir/$filename");
+    binmode $upload_fh;
        while ( <$upload_filehandle> )
        {
-               print UPLOADFILE;
+        print $upload_fh;
        }
-       close UPLOADFILE;
+    close $upload_fh;
 }
 else {
        $template->param(
index 9b793f4..bef3323 100755 (executable)
@@ -58,7 +58,8 @@ my $branches = GetBranches;
 my @branchloop;
 
 foreach (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) {
-  my $selected = 1 if $branches->{$_}->{branchcode} eq $$patron{branchcode};
+  my $selected;
+  $selected = 1 if $branches->{$_}->{branchcode} eq $$patron{branchcode};
   my %row = ( value => $_,
         selected => $selected,
         branchname => $branches->{$_}->{branchname},
index c28a2dc..daa2aa6 100755 (executable)
@@ -17,7 +17,7 @@ labels members misc offline_circ opac patroncards reports reserve reviews rotati
 serials sms suggestion t tags test tools virtualshelves Koha);
 
 my @dirs = qw( acqui admin authorities basket catalogue cataloguing circ debian errors labels
-    offline_circ reserve reviews rotating_collections serials sms virtualshelves Koha);
+    members offline_circ reserve reviews rotating_collections serials sms virtualshelves Koha misc);
 
 if ( not $ENV{TEST_QA} ) {
     my $msg = 'Author test. Set $ENV{TEST_QA} to a true value to run';