App-Oozie

 view release on metacpan or  search on metacpan

lib/App/Oozie/Deploy/Template/ttree.pm  view on Meta::CPAN

    my($class, $log_collector, @pass_through) = @_;
    my $self  = $class->SUPER::new(
                    @pass_through,
                );
    $self->{log_collector} = $log_collector;
    return $self;
}

sub run {
    my($self, @args) = @_;
    local @ARGV = @args;
    return $self->SUPER::run();
}

sub emit_warn {
    my($self, $msg) = @_;
    return$self->{log_collector}->(
        level => 'warn',
        msg   => $msg,
    );
}

lib/App/Oozie/Serializer.pm  view on Meta::CPAN


sub decode {
    my $self = shift;
    my $data = shift || die 'Nothing to decode!';

    die q{The data to decode can't be a reference!} if ref $data;

    my $is_file = $self->slurp && $data !~ m{ \n }xms && -e $data && -f _;

    my $rv = $self->__object->decode(
          $is_file            ? do { local(@ARGV, $/) = $data; <> }
        : $data eq 'meta.yml' ? die 'Only a file name (which does not exist) passed as meta data'
                 : $data
    );

    if ( $is_file ) {
       $self->_set___file( $data );
    }

    $self->_assert_type( $rv ) if $self->enforce_type;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 2.128 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-9e6bc14194b6 )