in reply to Any one know how to use sigtrap with moose?
This bit:
my $self_term=shift; my $self=shift;
... seems to be assuming that your handler will be called with two arguments, the second of which is an object.
But if you read sigtrap which refers you to perlvar you'll see that for real signals (not Perl's internal __DIE__ and __WARN__ signals) the handler gets passed just one parameter: the name of the signal (e.g. "INT", "QUIT", etc).
The fact that you're using Moose makes no difference here.
What are you actually hoping to achieve? What's the overall reason you're installing a signal handler? If you explain that, then perhaps somebody can give you some advice about how to go about doing it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Any one know how to use sigtrap with moose?
by hisycg@gmail.com (Initiate) on Jul 24, 2012 at 11:19 UTC | |
by Corion (Patriarch) on Jul 24, 2012 at 11:35 UTC | |
by tobyink (Canon) on Jul 24, 2012 at 11:35 UTC | |
by Corion (Patriarch) on Jul 24, 2012 at 11:47 UTC | |
by tobyink (Canon) on Jul 24, 2012 at 13:49 UTC | |
by hisycg@gmail.com (Initiate) on Jul 24, 2012 at 12:23 UTC |