summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmat7
1 files changed, 2 insertions, 5 deletions
diff --git a/mat b/mat
index 16478fe..48e7efd 100755
--- a/mat
+++ b/mat
@@ -14,9 +14,6 @@ use Text::Iconv;
tie my %Config, "Config::Simple", '/etc/mat.conf';
-use constant LABEL_NAME => $Config{'label_name'};
-use constant LABEL_ID_PREFIX => $Config{'label_id_prefix'};
-
#use Data::Dumper;
my $db = DBI->connect("dbi:SQLite:recipe.db", "", "", {RaiseError => 1,
@@ -276,11 +273,11 @@ sub print_label {
my $y_border = 40;
my $iconv = Text::Iconv->new("UTF-8", "ISO8859-1");
- my $row0 = LABEL_NAME;
+ my $row0 = $Config{'label_name'};
my $row1 = $iconv->convert($dish_name);
my $row2 = `date +%Y%m%d|tr -d '\n'`.' ('.$amount.'g)';
- my $idbarcode = GD::Barcode::QRcode->new(sprintf("%s%d", LABEL_ID_PREFIX, $id), { Version=>3 });
+ my $idbarcode = GD::Barcode::QRcode->new(sprintf("%s%d", $Config{'label_id_prefix'}, $id), { Version=>3 });
my $idbarcode_image=$idbarcode->plot();
my $idtext = new GD::Image(500, $fontsize * 2);