App-Oozie

 view release on metacpan or  search on metacpan

lib/App/Oozie/Role/Fields/Generic.pm  view on Meta::CPAN


option verbose => (
    is    => 'rw',
    short => 'v',
    doc   => 'Enable verbose messages',
);

has effective_username => (
    is      => 'ro',
    default => sub {
        (getpwuid $<)[0]
            || die 'Unable to locate the effective user name';
    },
);

1;

__END__

=pod

lib/App/Oozie/Types/Common.pm  view on Meta::CPAN

declare IsUserName => as Str,
    constraint => quote_sub q{
        my $val = shift;
        $val && getpwnam $val;
    },
;

declare IsUserId => as Int,
    constraint => quote_sub q{
        my $val = shift;
        defined $val && getpwuid $val;
    },
;

# File system

declare IsExecutable => as Str,
    constraint => quote_sub q{
        my $val = shift;
        return ! $val || ! -e $val || ! -x _ ? 0 : 1;
    },



( run in 0.391 second using v1.01-cache-2.11-cpan-8d75d55dd25 )