# 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.
my $bot = NCIP::User::BlockOrTrap->new();
$bot->AgencyId($ou->shortname());
$bot->BlockOrTrapType('Block Checkout');
- push @blocks, $bot;
+ push @$blocks, $bot;
$have_circ = 1;
}
my $bot = NCIP::User::BlockOrTrap->new();
$bot->AgencyId($ou->shotrname());
$bot->BlockOrTrapType('Block Holds');
- push @blocks, $bot;
+ push @$blocks, $bot;
$have_hold = 1;
}
my $bot = NCIP::User::BlockOrTrap->new();
$bot->AgencyId($ou->shortname());
$bot->BlockOrTrapType('Block Renewals');
- push @blocks, $bot;
+ push @$blocks, $bot;
$have_renew = 1;
}
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) {