.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Cal::DAV 3pm" .TH Cal::DAV 3pm "2011-05-08" "perl v5.12.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Cal::DAV \- a CalDAV client .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& my $cal = Cal::DAV\->new( user => $user, pass => $pass, url => $url); \& # the ics data will be fetched automatically if it\*(Aqs there \& \& # ... or you can parse some ics \& $cal\->parse(filename => $data); \& \& # cal now has all the methods of Data::ICal \& # you can now monkey around with the object \& \& # saves the updated calendar \& $cal\->save; \& \& # deletes the calendar \& $cal\->delete; \& \& # lock the file on the server \& $cal\->lock; \& \& # unlock the file on the server \& $cal\->unlock \& \& # steal the lock \& $cal\->steal_lock; \& \& # also \& $cal\->forcefully_unlock_all \& \& # and \& $cal\->lockdiscovery \& \& # resyncs it with the server \& $cal\->get; \& \& # Get the underlying HTTP::DAV object \& my $dav = $cal\->dav; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`Cal::DAV\*(C'\fR is actually a very thin wrapper round \f(CW\*(C`HTTP::DAV\*(C'\fR and \&\f(CW\*(C`Data::ICal\*(C'\fR but it may gain more functionality later and, in the mean time, serves as something that .SH "TESTING" .IX Header "TESTING" In order to test you need to define three environment variables: \&\f(CW\*(C`CAL_DAV_USER\*(C'\fR, \f(CW\*(C`CAL_DAV_PASS\*(C'\fR and \f(CW\*(C`CAL_DAV_URL_BASE\*(C'\fR which points to a \s-1DAV\s0 collection that the user supplied has write permissions for. .PP It should be noted that, at the moment, I'm having problems finding a CalDAV server that allows me to create files and so I can't run all the tests. .SH "METHODS" .IX Header "METHODS" .SS "new " .IX Subsection "new " Must have at least \f(CW\*(C`user\*(C'\fR, \f(CW\*(C`pass\*(C'\fR and \f(CW\*(C`url\*(C'\fR args where \&\f(CW\*(C`url\*(C'\fR is the url of a remote, \s-1DAV\s0 accessible \f(CW\*(C`.ics\*(C'\fR file. .PP Can optionally take an \f(CW\*(C`auto_commit\*(C'\fR option. See \f(CW\*(C`auto_commit()\*(C'\fR method below. .SS "parse " .IX Subsection "parse " Make a new calendar object using same arguments as \f(CW\*(C`Data::ICal\*(C'\fR's \f(CW\*(C`new()\*(C'\fR or \f(CW\*(C`parse()\*(C'\fR methods. .PP Does not auto save for you. .PP Returns 1 on success and 0 on failure. .SS "save [url]" .IX Subsection "save [url]" Save the calendar back to the server (or optionally to another path). .PP Returns 1 on success and 0 on failure. .SS "delete [url]" .IX Subsection "delete [url]" Delete the file on the server or optionally another url. .PP Returns 1 on success and 0 on failure. .SS "get [url]" .IX Subsection "get [url]" Refetch the file from the sever to sync it \- .PP Alternatively fetch an alternative url. .PP These will lose any local changes. .SS "lock" .IX Subsection "lock" Same options as \f(CW\*(C`HTTP::DAV\*(C'\fR's \f(CW\*(C`unlock\*(C'\fR. .SS "unlock" .IX Subsection "unlock" Same options as \f(CW\*(C`HTTP::DAV\*(C'\fR's \f(CW\*(C`unlock\*(C'\fR. .SS "steal_lock" .IX Subsection "steal_lock" Same options as \f(CW\*(C`HTTP::DAV\*(C'\fR's \f(CW\*(C`steal_lock\*(C'\fR. .SS "lockdiscovery" .IX Subsection "lockdiscovery" Same options as \f(CW\*(C`HTTP::DAV::Response\*(C'\fR's \f(CW\*(C`lockdiscovery\*(C'\fR. .SS "forcefully_unlock_all" .IX Subsection "forcefully_unlock_all" Same options as \f(CW\*(C`HTTP::DAV::Response\*(C'\fR's \f(CW\*(C`forcefully_unlock_all\*(C'\fR. .SS "dav [\s-1HTTP::DAV\s0]" .IX Subsection "dav [HTTP::DAV]" Get the underlying \f(CW\*(C`HTTP::DAV\*(C'\fR object or, alterntively, replace it with a a new one. .SS "cal" .IX Subsection "cal" Get the underlying cal object .SS "auto_commit [boolean]" .IX Subsection "auto_commit [boolean]" Whether to auto save on desctruction or not. .PP Defaults to 0. .SS "message" .IX Subsection "message" Same as \f(CW\*(C`HTTP::DAV\*(C'\fR's \f(CW\*(C`message\*(C'\fR function. .SS "errors" .IX Subsection "errors" Same as \f(CW\*(C`HTTP::DAV\*(C'\fR's \f(CW\*(C`errors\*(C'\fR function. .SH "AUTHOR" .IX Header "AUTHOR" Simon Wistow .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2007, Simon Wistow .PP Released under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\s-1HTTP::DAV\s0 .PP Data::ICal .PP http://tools.ietf.org/html/rfc4791