Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use get_hash error API instead of $@ at a distance
  • Loading branch information
jonjensen committed Nov 2, 2017
1 parent ca38267 commit 77653a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/Vend/UserControl.pm
@@ -1,6 +1,6 @@
# Vend::UserControl - Enhanced Interchange user database functions
#
# Copyright (C) 2003-2007 Interchange Development Group
# Copyright (C) 2003-2017 Interchange Development Group
# Copyright (C) 2003 Mike Heins, <mikey@heins.net>
#
# This program is free software; you can redistribute it and/or modify
Expand All @@ -15,7 +15,7 @@

package Vend::UserControl;

$VERSION = substr(q$Revision: 2.6 $, 10);
$VERSION = '2.7';

require Vend::UserDB;
use Vend::Data;
Expand Down Expand Up @@ -193,8 +193,8 @@ sub get_values {
foreach $area (qw!PREFERENCES CARTS!) {
my $f = $location->{$area};
if ($present->{$f}) {
my $s = $self->get_hash($area);
die ::errmsg("Bad structure in %s: %s", $f, $@) if $@;
my $s = $self->get_hash($area)
or die ::errmsg("Bad structure in %s: %s", $f, $self->{ERROR});
$::Values->{$f} = join "\n", sort keys %$s;
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Vend/UserDB.pm
Expand Up @@ -1171,8 +1171,8 @@ sub get_values {
foreach $area (qw!SHIPPING BILLING PREFERENCES CARTS!) {
my $f = $self->{LOCATION}->{$area};
if ($self->{PRESENT}->{$f}) {
my $s = $self->get_hash($area);
die errmsg("Bad structure in %s: %s", $f, $@) if $@;
my $s = $self->get_hash($area)
or die errmsg("Bad structure in %s: %s", $f, $self->{ERROR});
$::Values->{$f} = join "\n", sort keys %$s;
}
}
Expand Down

0 comments on commit 77653a2

Please sign in to comment.