The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::ManageSieve::Siesh - Expanding Net::ManagieSieve beyond the pure protocol

VERSION

Version 0.05

SYNOPSIS

Net::ManageSieve::Siesh expands Net::ManagieSieve beyond just implementing the core RFC protocol. There are functions to upload and download files, deactivating scripts, copy and move them etc.

    use Net::ManageSieve::Siesh;

    my $sieve = Net::ManageSieve::Siesh->new();
    $sieve->copy('script1','script2');
    $sieve->mv('script2','script3');
    $sieve->put('../script.txt','script4');
    $sieve->get('script1','../script.txt');

If you're just searching for a comamnd line interface to ManageSieve, please take a look at siesh(1).

ERROR HANDLING

Unlike Net::ManagieSieve this library just croaks in the case of error. Nothing wrong with that!

METHODS

deactivate()

Deactivates all active scripts on the server. This has the same effect as using the function setactive with an empty string as argument.

activate()

Activates the scripts. This is identical to call setactive, but is easier to remember.

movescript($oldscriptname,$newscriptname)

Renames the script. This functions is equivalent to copying a script and then deleting the source script. In case you try to move the currently active script, it's deactivated first and later reactivated unter it's new name.

copyscript($oldscriptname,$newscriptname)

Copy the script $oldscriptname to $newscriptname.

temp_scriptfile($scriptname,$create)

Calls tempfile from File::Temp and writes the content of $scriptname into the returned file. Returns the opened filehandle and the filename. Unless $create is true, return undef if the requested script does not exist.

putfile($file,$scriptname)

Uploads $file with the name $scriptname to the server.

getfile($scriptname,$file)

Downloads the script names <$scriptname> to the file specified by $file.

listscripts()

Returns a list of scripts. This function overwrites listscripts provided by Net::ManageSieve in order to return a array. To get the active script call get_active. If the first paramter is true only the active script is not returned.

is_active($script)

Returns true if $script is the currently active script and false if not.

get_active()

Returns the name of the currently active script and the empty string if there is not active script.

script_exists($script)

Check if $script exists on server.

deletescript(@scripts)

Delete all @scripts.

AUTHOR

Mario Domgoergen, <mario at domgoergen.com>

BUGS

Please report any bugs or feature requests to bug-app-siesh at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-Siesh. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SEE ALSO

siesh(1)

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Net::ManageSieve::Siesh

You can also look for information at:

    L<http://www.math.uni-bonn.de/~dom/siesh/>

COPYRIGHT & LICENSE

Copyright 2008 Mario Domgoergen, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.