| App-MadEye documentation | Contained in the App-MadEye distribution. |
App::MadEye::Plugin::Check::User - check uid
- module: Check::User
config:
user: tokuhirom
Tokuhiro Matsuno
| App-MadEye documentation | Contained in the App-MadEye distribution. |
package App::MadEye::Plugin::Check::User; use strict; use warnings; use base qw/Class::Component::Plugin/; use POSIX qw(getuid getpwuid); sub check :Hook { my ($self, $context, $args) = @_; my $user = $self->config->{config}->{user}; my @pw = getpwuid getuid; my $current_user = $pw[0]; if ($current_user ne $user) { die "this script must run by $user user!(not $current_user)"; } } 1; __END__