|
NAMENet::DAV::LockManager - Provides support for WebDAV lockingVERSIONThis document describes Net::DAV::LockManager version 1.305.SYNOPSISuse Net::DAV::LockManager; my $mgr = Net::DAV::LockManager->new(); if ( my $lock = $mgr->lock({ 'path' => '/foo/bar', 'owner' => 'fred' }) ) { # Fred has access. # Fred changes file. $mgr->unlock({ 'path' => '/foo/bar', 'owner' => 'fred', 'token' => $lock->{'token'} }); } DESCRIPTIONThe "Net::DAV::LockManager" class provides the ability to handle resource locking in the style needed by WebDAV. It does not perform OS-level locking, but only locking in the mind of the LockManager.The current implementation only supports exlusive locking. However, it does support indirect locks and expiration of locks. It also maintains the lock tokens and manages ownership independent of OS-level ownership. INTERFACEnew()Create a new "Net::DAV::LockManager" object to manage locking.can_modify( $hashref )Return true if the path supplied in the hash ref can be modified by the user specified in the hash ref. The hash ref supplies the following named parameters.
lock( $hash_ref )Lock the path supplied in the hash ref based on the parameters in the hash ref.
Returns a "Net::DAV::Lock" object describing the lock on success and "undef" on failure. refresh_lock( $hash_ref )Updates the timeout value on the lock specified by the supplied hash ref. The hash ref contains the following named parameters.
Returns a "Net::DAV::Lock" object describing the lock on success and "undef" on failure. unlock( $hash_ref )Unlock the resource specified by the hash ref. The hash ref specifies the resource to unlock and the credentials needed to access it. The named parameters in the hash are
Returns true on success, false otherwise. find_lock( $hash_ref )Find the lock that pretects the resource listed in $hash_ref. Returns the "Net::DAV::Lock" object representing the lock, or "undef" if none is found.The hash reference contains the path to the resource that we want to check.
list_all_locks( $hash_ref )List all the locks that pretect the resource listed in $hash_ref. Returns an array of "Net::DAV::Lock" objects representing the locks.The hash reference contains the path to the resource that we want to check.
DIAGNOSTICSMost of the methods perform parameter validation and "die" on error. This is based on the idea that this is a mostly internal module that should be being called from non-user code. Therefore, it is the client code's responsibility to get the parameters right.
CONFIGURATION AND ENVIRONMENTModName requires no configuration files or environment variables.DEPENDENCIESNone.INCOMPATIBILITIESNone reported.BUGS AND LIMITATIONSNo bugs have been reported.AUTHORG. Wade Johnson "wade@cpanel.net" Erin Schoenhals "erin@cpanel.net"LICENSE AND COPYRIGHTCopyright (c) 2010, cPanel, Inc. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
Visit the GSP FreeBSD Man Page Interface. |