summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2013-09-10 14:37:58 +0200
committerSven Eden <yamakuzure@gmx.net>2013-09-10 14:37:58 +0200
commit4542ee856289204b356a517fd28444572ed5e015 (patch)
tree5724e80da66757ae368a7b8f597d6bbae69fbc17
parentIf read only mode is set, both Enter and ESC help show "Exit" and the key pre... (diff)
downloadufed-4542ee856289204b356a517fd28444572ed5e015.tar.gz
ufed-4542ee856289204b356a517fd28444572ed5e015.tar.bz2
ufed-4542ee856289204b356a517fd28444572ed5e015.zip
Change the usage of Readonly (unneccessary dependency) to pragma constant (no external dependency). It is only used for DEBUG, which is only questioned _once_.
-rw-r--r--Portage.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/Portage.pm b/Portage.pm
index b909092..6cdab98 100644
--- a/Portage.pm
+++ b/Portage.pm
@@ -6,7 +6,6 @@ package Portage;
use strict;
use warnings;
-use Readonly;
BEGIN {
use Exporter ();
@@ -20,7 +19,7 @@ BEGIN {
# --- public members ---
# Set this to 1 to get debugging output
-Readonly our $DEBUG => 0;
+use constant { DEBUG => 0 };
# $use_flags - hashref that represents the combined and
# consolidated data about all valid use flags
@@ -172,13 +171,13 @@ INIT {
# --- public methods implementations ---
# Write a given message to STDERR adding a newline at the end
-# This function does nothing unless $DEBUG is set to something
+# This function does nothing unless DEBUG is set to something
# different than zero
# Parameter 1: The message
sub debugMsg
{
my ($msg) = @_;
- $DEBUG or return;
+ DEBUG or return;
print STDERR "$msg\n";
return;
}