Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

net::sieve::script::rule(3pm) [debian man page]

Net::Sieve::Script::Rule(3pm)				User Contributed Perl Documentation			     Net::Sieve::Script::Rule(3pm)

NAME
Net::Sieve::Script::Rule - parse and write rules in sieve scripts SYNOPSIS
use Net::Sieve::Script::Rule; my $pRule = Net::Sieve::Script::Rule->new ( ctrl => $ctrl, test_list => $test_list, block => $block, order => $order ); or my $rule = Net::Sieve::Script::Rule->new(); my $cond = Net::Sieve::Script::Condition->new('header'); $cond->match_type(':contains'); $cond->header_list('"Subject"'); $cond->key_list('"Re: Test2"'); my $actions = 'fileinto "INBOX.test"; stop;'; $rule->add_condition($cond); $rule->add_action($actions); print $rule->write; DESCRIPTION
CONSTRUCTOR
new Arguments : order => : optionnal set priority for rule ctrl => : optionnal default 'if', else could be 'else', 'elsif' or 'vacation' test_list => : optionnal conditions by string or by Condition Object block => : optionnal block of commands Returns : Net::Sieve::Script::Rule object Set accessors alternate : as param ctrl conditions : first condition in tree actions : array of actions objects priority : rule order in script, main id for rule require : METHODS
equals return 1 if rules are equals write Return rule in text format write_condition set require for used conditions return conditions in text format write_action set require for used actions return actions in text format delete_condition Purpose : delete condition by rule, delete all block on delete anyof/allof delete single anyof/allof block : single condition move up Arguments : condition id Returns : 1 on success, 0 on error add_condition Purpose : add condition to rule, add 'allof' group on second rule Arguments : string or Condition object Returns : new condition id or 0 on error swap_actions swap actions by order return 1 on succes, 0 on failure find_action find action by order Returns: Net::Sieve::Script::Action object, 0 on error delete_action delete action by order, first is 1; add_action Purpose : add action at end of block Arguments : command line or command line list with ; separator or Net::Sieve::Script::Action object Return : 1 on success AUTHOR
Yves Agostini CPAN ID: YVESAGO Univ Metz agostini@univ-metz.fr http://www.crium.univ-metz.fr COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.10.0 2008-09-15 Net::Sieve::Script::Rule(3pm)

Check Out this Related Man Page

File::Find::Rule::Procedural(3) 			User Contributed Perl Documentation			   File::Find::Rule::Procedural(3)

NAME
File::Find::Rule::Procedural - File::Find::Rule's procedural interface SYNOPSIS
use File::Find::Rule; # find all .pm files, procedurally my @files = find(file => name => '*.pm', in => @INC); DESCRIPTION
In addition to the regular object-oriented interface, File::Find::Rule provides two subroutines for you to use. "find( @clauses )" "rule( @clauses )" "find" and "rule" can be used to invoke any methods available to the OO version. "rule" is a synonym for "find" Passing more than one value to a clause is done with an anonymous array: my $finder = find( name => [ '*.mp3', '*.ogg' ] ); "find" and "rule" both return a File::Find::Rule instance, unless one of the arguments is "in", in which case it returns a list of things that match the rule. my @files = find( name => [ '*.mp3', '*.ogg' ], in => $ENV{HOME} ); Please note that "in" will be the last clause evaluated, and so this code will search for mp3s regardless of size. my @files = find( name => '*.mp3', in => $ENV{HOME}, size => '<2k' ); ^ | Clause processing stopped here ------/ It is also possible to invert a single rule by prefixing it with "!" like so: # large files that aren't videos my @files = find( file => '!name' => [ '*.avi', '*.mov' ], size => '>20M', in => $ENV{HOME} ); AUTHOR
Richard Clamp <richardc@unixbeard.net> COPYRIGHT
Copyright (C) 2003 Richard Clamp. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
File::Find::Rule perl v5.18.2 2011-09-19 File::Find::Rule::Procedural(3)
Man Page