NAME
Sympa::Task - Tasks of Sympa
SYNOPSIS
use Sympa::Task;
$task = Sympa::Task->new($serialized, context => $list,
model => 'remind', label => 'EXEC', date => 1234567890);
$task = Sympa::Task->new(context => $list, model => 'remind');
DESCRIPTION
Methods
- new ( $serialized, context => $that, model => $model, label => $label, date => $date )
-
new ( context => $that, model => $model, [ name => $name ], [ label => $label ], [ date => $date ] )
Constructor. Creates a new instance of Sympa::Task class.
The first style is usually used by task spool class (see also Sympa::Spool::Task):
context
,model
,label
anddate
are given by metadata (file name).Parameters:
-
$serialized
Serialized content of task file in spool. If omitted (the second style above), appropriate task file is read, parsed and used for serialized content.
-
context => $that
Context of the task: List (instance of Sympa::List) or Site (
'*'
). -
model => $model
Task model.
-
name => $name
Selector of task. If omitted, value of parameter of context object that corresponds to task model is used; if parameter value was not valid, constructor returns
undef
. -
label => $label
Label of task. If omitted, default label (in many cases, empty string) is used.
-
date => $date
Unix time. creation date of label. If omitted, current time.
Returns:
New instance of Sympa::Task class.
-
-
dup ( )
Copy constructor. Creates deep copy of instance.
-
lines ( )
Instance method. Gets an array of parsed information by each line of serialized content.
-
to_string ( )
Instance method. Gets serialized content of the task.
-
get_id ( )
Instasnce method. Gets unique identifier of instance.
Function
-
get_tasks ( $that, $model )
Function. Gets all possible tasks for particular context.
Parameters:
-
$that
Context. Instance of Sympa::List or
'*'
. -
$model
Task model.
Returns:
An arrayref of possible tasks.
-
Attributes
- {date}
- {model}
-
{title}
TBD.
SEE ALSO
HISTORY
Task module appeared on Sympa 5.2b.1. It was renamed to Sympa::Task on Sympa 6.2a.41.
It was rewritten and split into Sympa::Task and Sympa::Spool::Task on Sympa 6.2.37b.2.