Permalink
Browse files

Add Reflex::Role::SigCatcher and Reflex::SigCatcher to reify it.

  • Loading branch information...
1 parent 51d8dc1 commit a12f9734ee6df7833131e1c5a91d5fdff0c470b3 @rcaputo committed Jul 5, 2010
Showing with 28 additions and 0 deletions.
  1. +28 −0 lib/Reflex/SigCatcher.pm
View
@@ -0,0 +1,28 @@
+package Reflex::SigCatcher;
+
+use Moose;
+extends 'Reflex::Base';
+
+has signal => (
+ is => 'ro',
+ isa => 'Str',
+ required => 1,
+);
+
+has active => (
+ is => 'ro',
+ isa => 'Bool',
+ default => 1,
+);
+
+with 'Reflex::Role::SigCatcher' => {
+ signal => 'signal',
+ active => 'active',
+ cb_signal => 'on_signal',
+ method_start => 'start',
+ method_stop => 'stop',
+ method_pause => 'pause',
+ method_resume => 'resume',
+};
+
+1;

0 comments on commit a12f973

Please sign in to comment.