debugify a warn
authorGalen Charlton <gmcharlt@gmail.com>
Sun, 6 Sep 2009 01:30:30 +0000 (21:30 -0400)
committerGalen Charlton <gmcharlt@gmail.com>
Sun, 6 Sep 2009 01:43:13 +0000 (21:43 -0400)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
C4/Labels/Label.pm

index 26bdcf5..9cf5026 100644 (file)
@@ -205,9 +205,8 @@ sub _get_barcode_data {
         elsif ( $f =~ /^($match_kohatable).*/ ) {
             if ($item->{$f}) {
                 $datastring .= $item->{$f};
-            }
-            else {
-                warn sprintf("The '%s' field contains no data.", $f);
+            } else {
+                $debug and warn sprintf("The '%s' field contains no data.", $f);
             }
             $f = $';
             next FIELD_LIST;