projects
/
gruntmaster-daemon.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add some tests with invalid jobs
[gruntmaster-daemon.git]
/
lib
/
Gruntmaster
/
Daemon.pm
diff --git
a/lib/Gruntmaster/Daemon.pm
b/lib/Gruntmaster/Daemon.pm
index 880c0da49a47c1cf8915f952234b6c2609573e38..1c58550a7e0a8c584c1f25edbce6b75642807577 100644
(file)
--- a/
lib/Gruntmaster/Daemon.pm
+++ b/
lib/Gruntmaster/Daemon.pm
@@
-35,19
+35,13
@@
use constant FORMAT_EXTENSION => {
my $db;
my $db;
-sub safe_can
_nodie
{
+sub safe_can {
my ($type, $sub, $name) = @_;
my ($type, $sub, $name) = @_;
-
return
unless $name =~ /^\w+$/s;
+
get_logger->logdie("Invalid \l$type: '$name'")
unless $name =~ /^\w+$/s;
my $pkg = __PACKAGE__ . "::${type}::${name}";
eval "require $pkg" or get_logger->warn("Error while requiring $pkg: $@");
my $pkg = __PACKAGE__ . "::${type}::${name}";
eval "require $pkg" or get_logger->warn("Error while requiring $pkg: $@");
- $pkg->can($sub);
-}
-
-sub safe_can {
- my ($type, $sub, $name) = @_;
-
- safe_can_nodie @_ or get_logger->logdie("No such \l$type: '$name'");
+ $pkg->can($sub) or get_logger->logdie("No such \l$type: '$name'");
}
sub process{
}
sub process{
This page took
0.009758 seconds
and
4
git commands to generate.