File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #
2+ # $Id: Exists.pm,v a82704bbf31a 2024/02/04 14:25:56 gomor $
3+ #
4+ package OPP::Proc::Exists ;
5+ use strict;
6+ use warnings;
7+
8+ use base qw( OPP::Proc) ;
9+ __PACKAGE__ -> cgBuildIndices;
10+
11+ our $VERSION = ' 1.00' ;
12+
13+ #
14+ # | exists cpe
15+ #
16+ sub process {
17+ my $self = shift ;
18+ my ($input ) = @_ ;
19+
20+ my $field = $self -> options-> {0 } or return ;
21+
22+ my $values = $self -> value($input , $field );
23+ # Field by that name, we keep original input untouched:
24+ $self -> output-> add($input ) if defined $values ;
25+
26+ # Otherwise, we skip it.
27+
28+ return 1;
29+ }
30+
31+ 1;
32+
33+ __END__
34+
35+ =head1 NAME
36+
37+ OPP::Proc::Exists - exists processor
38+
39+ =head1 SYNOPSIS
40+
41+ =head1 DESCRIPTION
42+
43+ =head1 COPYRIGHT AND LICENSE
44+
45+ Copyright (c) 2024, Patrice E<lt> GomoRE<gt> Auffret
46+
47+ You may distribute this module under the terms of The BSD 3-Clause License.
48+ See LICENSE file in the source distribution archive.
49+
50+ =head1 AUTHOR
51+
52+ Patrice E<lt> GomoRE<gt> Auffret
53+
54+ =cut
You can’t perform that action at this time.
0 commit comments