Fix a few things in NCIP::ILS::Evergreen turned up by perl -c.
authorJason Stephenson <jason@sigio.com>
Sat, 23 Aug 2014 15:11:52 +0000 (11:11 -0400)
committerJason Stephenson <jason@sigio.com>
Sat, 23 Aug 2014 15:19:20 +0000 (11:19 -0400)
Signed-off-by: Jason Stephenson <jason@sigio.com>
lib/NCIP/ILS/Evergreen.pm

index f97156f..bcdfe8c 100644 (file)
@@ -75,7 +75,7 @@ my $U = 'OpenILS::Application::AppUtils';
 # The usual constructor:
 sub new {
     my $class = shift;
-    $class = ref $class or $class;
+    $class = ref($class) if (ref $class);
 
     # Instantiate our parent with the rest of the arguments.  It
     # creates a blessed hashref.
@@ -270,7 +270,7 @@ sub lookupuser {
                     my $bot = NCIP::User::BlockOrTrap->new();
                     $bot->AgencyId($ou->shortname());
                     $bot->BlockOrTrapType('Block Checkout');
-                    push @blocks, $bot;
+                    push @$blocks, $bot;
                     $have_circ = 1;
                 }
 
@@ -279,7 +279,7 @@ sub lookupuser {
                     my $bot = NCIP::User::BlockOrTrap->new();
                     $bot->AgencyId($ou->shotrname());
                     $bot->BlockOrTrapType('Block Holds');
-                    push @blocks, $bot;
+                    push @$blocks, $bot;
                     $have_hold = 1;
                 }
 
@@ -288,7 +288,7 @@ sub lookupuser {
                     my $bot = NCIP::User::BlockOrTrap->new();
                     $bot->AgencyId($ou->shortname());
                     $bot->BlockOrTrapType('Block Renewals');
-                    push @blocks, $bot;
+                    push @$blocks, $bot;
                     $have_renew = 1;
                 }
 
@@ -436,7 +436,7 @@ sub _init {
     foreach (@{$self->{config}->{patrons}->{block_profile}}) {
         if (ref $_) {
             my $pgt = $e->retrieve_permission_grp_tree($_->{grp});
-            push(@{$blocked_profiles}, $pgt) if ($pgt);
+            push(@{$self->{blocked_profiles}}, $pgt) if ($pgt);
         } else {
             my $result = $e->search_permission_grp_tree({name => $_});
             if ($result && @$result) {