Permalink
Browse files

refactor: rename sub (better name)

  • Loading branch information...
1 parent 396b97b commit 47e15c7118ebaa7887d7e7b0393f0d7e3d0f2e0a Steven Haryanto (on PC) committed Nov 4, 2010
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/Log/Any/App.pm
View
@@ -568,7 +568,7 @@ sub _parse_opts {
$i++;
}
- $spec->{level} = _find_level("", "");
+ $spec->{level} = _set_level("", "");
if (!$spec->{level} && defined($opts{level})) {
$spec->{level} = _check_level($opts{level}, "-level");
_debug("Setting general level to $spec->{level} (from -level)");
@@ -639,7 +639,7 @@ sub _is_daemon {
sub _default_file {
my ($spec) = @_;
- my $level = _find_level("file", "file");
+ my $level = _set_level("file", "file");
if (!$level) {
$level = $spec->{level};
_debug("Setting level of file to general level ($level)");
@@ -685,7 +685,7 @@ sub _parse_opt_file {
sub _default_dir {
my ($spec) = @_;
- my $level = _find_level("dir", "dir");
+ my $level = _set_level("dir", "dir");
if (!$level) {
$level = $spec->{level};
_debug("Setting level of dir to general level ($level)");
@@ -733,7 +733,7 @@ sub _parse_opt_dir {
sub _default_screen {
my ($spec) = @_;
- my $level = _find_level("screen", "screen");
+ my $level = _set_level("screen", "screen");
if (!$level) {
$level = $spec->{level};
_debug("Setting level of screen to general level ($level)");
@@ -769,7 +769,7 @@ sub _parse_opt_screen {
sub _default_syslog {
my ($spec) = @_;
- my $level = _find_level("syslog", "syslog");
+ my $level = _set_level("syslog", "syslog");
if (!$level) {
$level = $spec->{level};
_debug("Setting level of syslog to general level ($level)");
@@ -827,7 +827,7 @@ sub _check_level {
lc($1);
}
-sub _find_level {
+sub _set_level {
my ($prefix, $which) = @_;
my $p_ = $prefix ? "${prefix}_" : "";
my $P_ = $prefix ? uc("${prefix}_") : "";

0 comments on commit 47e15c7

Please sign in to comment.