Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

be simple

git-svn-id: http://svn.coderepos.org/share/lang/perl/App-MadEye/trunk@14629 d0d07461-0603-4401-acd4-de1884942a52
  • Loading branch information...
commit 1e53d65aceb27d613e637a4a7a4129f257ce4e75 1 parent 7739ea6
tokuhirom authored
View
4 lib/App/MadEye/Plugin/Check/Flock.pm
@@ -5,7 +5,7 @@ use base qw/App::MadEye::Plugin::Base/;
use LWP::UserAgent;
use Fcntl ":flock";
-sub check : Hook('check') {
+sub check : Hook {
my ($self, $context, $args) = @_;
my $file_name = $self->config->{config}->{file} or die "missing file";
@@ -13,7 +13,7 @@ sub check : Hook('check') {
my $status = flock( $self->{lock_fh}, LOCK_EX|LOCK_NB ) or die "cannot get the lock";
}
-sub release_lock : Hook('after_run_jobs') {
+sub after_run_jobs : Hook {
my ($self, $context, $args) = @_;
close($self->{lock_fh}); # release lock
View
2  lib/App/MadEye/Plugin/Check/Network.pm
@@ -4,7 +4,7 @@ use warnings;
use base qw/Class::Component::Plugin/;
use LWP::UserAgent;
-sub check : Hook('check') {
+sub check : Hook {
my ($self, $context, $args) = @_;
my $conf = $self->config->{config};
View
2  lib/App/MadEye/Plugin/Check/User.pm
@@ -4,7 +4,7 @@ use warnings;
use base qw/Class::Component::Plugin/;
use POSIX qw(getuid getpwuid);
-sub check :Hook('check') {
+sub check :Hook {
my ($self, $context, $args) = @_;
my $user = $self->config->{config}->{user};
View
2  lib/App/MadEye/Plugin/Notify/Debug.pm
@@ -4,7 +4,7 @@ use warnings;
use base qw/Class::Component::Plugin/;
use Data::Dumper;
-sub notify :Hook('notify') {
+sub notify :Hook {
my ($self, $context, $args) = @_;
warn Dumper($args);
View
2  lib/App/MadEye/Plugin/Notify/Email.pm
@@ -6,7 +6,7 @@ use Params::Validate;
use MIME::Lite;
use DateTime;
-sub notify : Hook('notify') {
+sub notify : Hook {
my ($self, $context, $args) = @_;
my $conf = $self->{config}->{config};
View
2  lib/App/MadEye/Plugin/Notify/IKC.pm
@@ -5,7 +5,7 @@ use base qw/App::MadEye::Plugin::Base/;
use Text::Truncate qw/truncstr/;
use POE::Component::IKC::ClientLite;
-sub notify :Hook('notify') {
+sub notify :Hook {
my ($self, $context, $args) = @_;
my $config = $self->config->{config};
View
4 lib/App/MadEye/Plugin/Worker/Gearman.pm
@@ -29,7 +29,7 @@ sub new {
$self;
}
-sub run_workers : Hook('before_run_jobs') {
+sub before_run_jobs : Hook {
my ($self, $context) = @_;
my @child_pids = $self->_run_workers($context);
@@ -93,7 +93,7 @@ sub run_job :Method {
);
}
-sub after_run_jobs : Hook('after_run_jobs') {
+sub after_run_jobs : Hook {
my ($self, $context, $args) = @_;
$context->log(debug => 'wait children!');
Please sign in to comment.
Something went wrong with that request. Please try again.