1Data::ICal::Property(3)User Contributed Perl DocumentatioDnata::ICal::Property(3)
2
3
4
6 Data::ICal::Property - Represents a property on an entry in an
7 iCalendar file
8
10 A Data::ICal::Property object represents a single property on an entry
11 in an iCalendar file. Properties have parameters in addition to their
12 value.
13
14 You shouldn't need to create Data::ICal::Property values directly --
15 just use "add_property" in Data::ICal::Entry.
16
17 The "encoding" parameter value is only interpreted by Data::ICal in the
18 "decoded_value" and "encode" methods: all other methods access the
19 encoded version directly (if there is an encoding).
20
21 Currently, the only supported encoding is "QUOTED-PRINTABLE".
22
24 new $key, $value, [$parameter_hash]
25 Creates a new Data::ICal::Property with key $key and value $value.
26
27 If $parameter_hash is provided, sets the property's parameters to it.
28 The parameter hash should have keys equal to the names of the
29 parameters (case insensitive; parameter hashes should not contain two
30 different keys which are the same when converted to upper case); the
31 values should either be a string if the parameter has a single value or
32 an array reference of strings if the parameter has multiple values.
33
34 key [$key]
35 Gets or sets the key name of this property.
36
37 value [$value]
38 Gets or sets the value of this property.
39
40 parameters [$param_hash]
41 Gets or sets the parameter hash reference of this property. Parameter
42 keys are converted to upper case.
43
44 vcal10 [$bool]
45 Gets or sets a boolean saying whether this should be interpreted as
46 vCalendar 1.0 (as opposed to iCalendar 2.0). Generally, you can just
47 set this on your main Data::ICal object when you construct it;
48 "add_entry" automatically makes sure that sub-entries end up with the
49 same value as their parents, and "add_property" makes sure that
50 properties end up with the same value as their entry.
51
52 decoded_value
53 Gets the value of this property, converted from the encoding specified
54 in its encoding parameter. (That is, "value" will return the encoded
55 version; this will apply the encoding.) If the encoding is not
56 specified or recognized, just returns the raw value.
57
58 encode $encoding
59 Calls "decoded_value" to get the current decoded value, then encodes it
60 in $encoding, sets the value to that, and sets the encoding parameter
61 to $encoding. ($encoding is first converted to upper case.)
62
63 If $encoding is undef, deletes the encoding parameter and sets the
64 value to the decoded value. Does nothing if the encoding is not
65 recognized.
66
67 as_string ARGS
68 Returns the property formatted as a string (including trailing
69 newline).
70
71 Takes named arguments:
72
73 fold
74 Defaults to true. pass in a false value if you need to generate
75 non-rfc-compliant calendars.
76
77 crlf
78 Defaults to "\x0d\x0a", per RFC 2445 spec. This option is
79 primarily for backwards compatability with version of this module
80 prior to 0.16, which used "\x0a".
81
83 Jesse Vincent "<jesse@bestpractical.com>" with David Glasser, Simon
84 Wistow, and Alex Vandiver
85
87 Copyright (c) 2005 - 2009, Best Practical Solutions, LLC. All rights
88 reserved.
89
90 This module is free software; you can redistribute it and/or modify it
91 under the same terms as Perl itself. See perlartistic.
92
94 BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
95 FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
96 WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
97 PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND,
98 EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
99 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
100 ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
101 YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
102 NECESSARY SERVICING, REPAIR, OR CORRECTION.
103
104 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
105 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
106 REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE
107 TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR
108 CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
109 SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
110 RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
111 FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
112 SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
113 DAMAGES.
114
115
116
117perl v5.12.0 2009-07-10 Data::ICal::Property(3)