1IMAP::IMSP(3)         User Contributed Perl Documentation        IMAP::IMSP(3)
2
3
4

NAME

6       Cyrus::IMAP::IMSP - Perl module for Cyrus IMSP user options
7

SYNOPSIS

9         use Cyrus::IMAP::IMSP;
10
11         my $client = Cyrus::IMAP::IMSP->new('imsphost'[, $port[, $flags]]);
12         $rc = $client->set('mailreader.window.size', '200x300');
13         %options = $client->get('mailreader.*')
14         $rc = $client->unset('mailreader.window.size');
15

DESCRIPTION

17       This module is a Perl interface to the Cyrus IMSP functions that relate
18       to user options (preferences). Only three IMSP operations are
19       implemented: set, unset, and get.
20

METHODS

22       new($server[, $port[, $flags]])
23           Instantiates a Cyrus::IMAP::IMSP object.  This is in fact a
24           Cyrus::IMAP object with a few additional methods, so all
25           Cyrus::IMAP methods are available if needed.  (In particular, you
26           will always want to use the "authenticate" method.)
27
28       error
29           Return the last error that occurred, or undef if the last operation
30           was successful.  This is in some cases (such as "get") the only way
31           to distinguish between a successful return of an empty list and an
32           error return.
33
34           Calling "error" does not reset the error state, so it is legal to
35           write:
36
37               %options = $client->get($option);
38               print STDERR "Error: ", $client->error if $client->error;
39
40       set($option, $value)
41           Sets the option named by $option to the value in $value.
42
43           There are no restrictions or quoting rules needed to protect
44           special characters in the value argument. (The Cyrus::IMAP layer
45           will take care those details by adding double quotes or a literal
46           introducer.)
47
48           If successful, returns 1. Otherwise, returns undef and makes an
49           error message available through the "error" function.
50
51       unset($option)
52           Removes the option named by $option. The option is completely
53           removed from the user's name space but will revert to a site-wide
54           default if one has been set. Note that this is different from
55           assigning an option the null value with set($option, '').
56
57           If you try to unset an option that does not exist, an error is
58           returned saying that the option was already unset.
59
60           If successful, returns 1. Otherwise, returns undef and makes an
61           error message available through the "error" function.
62
63       get($option_pattern)
64           Get takes either an option name or a pattern of names to fetch. The
65           pattern can contain either "*" or "%" wildcards anywhere in the
66           string. The usual IMAP wildcard semantics apply.
67
68           The return value is a hash of options with each key being an option
69           name and each value being the option's value string. If an empty
70           hash is returned, it's either because there were no matching
71           options or because some error happened. Check the "error" function
72           to see which was the case.
73
74           The IMSP protocol also returns an access flag of "[READ-WRITE]" or
75           "[READ-ONLY]" but that information is discarded by this function. A
76           more complicated function that returns both the value and the
77           access flag could be added later if needed.
78

AUTHOR

80       Brandon S. Allbery, allbery@ece.cmu.edu IMSP modifications by Joseph
81       Jackson, jackson@CMU.EDU
82

SEE ALSO

84       Cyrus::IMAP perl(1), cyradm(1), imapd(8).
85
86
87
88perl v5.16.3                      2012-12-01                     IMAP::IMSP(3)
Impressum