HTTP-DAV
view release on metacpan or search on metacpan
doc/html/HTTP-DAV.html view on Meta::CPAN
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>HTTP::DAV - A WebDAV client library for Perl5</title>
<link rel="stylesheet" href="perldav_plain.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>
<body>
<h1 id="NAME">NAME</h1>
<p>HTTP::DAV - A WebDAV client library for Perl5</p>
<h1 id="SYNOPSIS">SYNOPSIS</h1>
<pre><code> # DAV script that connects to a webserver, safely makes
# a new directory and uploads all html files in
# the /tmp directory.
use HTTP::DAV;
$d = HTTP::DAV->new();
$url = "http://host.org:8080/dav/";
$d->credentials(
-user => "pcollins",
-pass => "mypass",
-url => $url,
-realm => "DAV Realm"
);
$d->open( -url => $url )
or die("Couldn't open $url: " .$d->message . "\n");
# Make a null lock on newdir
$d->lock( -url => "$url/newdir", -timeout => "10m" )
or die "Won't put unless I can lock for 10 minutes\n";
# Make a new directory
$d->mkcol( -url => "$url/newdir" )
or die "Couldn't make newdir at $url\n";
# Upload multiple files to newdir.
if ( $d->put( -local => "/tmp/*.html", -url => $url ) ) {
print "successfully uploaded multiple files to $url\n";
} else {
print "put failed: " . $d->message . "\n";
}
$d->unlock( -url => $url );</code></pre>
<h1 id="DESCRIPTION">DESCRIPTION</h1>
<p>HTTP::DAV is a Perl API for interacting with and modifying content on webservers using the WebDAV protocol. Now you can LOCK, DELETE and PUT files and much more on a DAV-enabled webserver.</p>
<p>HTTP::DAV is part of the PerlDAV project hosted at http://www.webdav.org/perldav/ and has the following features:</p>
( run in 1.035 second using v1.01-cache-2.11-cpan-119454b85a5 )