ICal/Entry/Journal.pm

filter: Statementstmt 55.5% 10 / 18 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 42.8% 3 / 7 Podpod 100% 4 / 4 totaltotal 51.5% 17 / 33 CC 3 SCAR 12.4
CC
3
Cov
45%
mandatory_unique_properties
6.0
optional_unique_properties
6.0
ical_entry_type
2.0
CRAP 3.4
« ICal/Entry/FreeBusy.pm ↑ Summary ICal/Entry/Event.pm »
1 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Data::ICal::Entry::Journal;
5  
6 1 ▶use base qw/Data::ICal::Entry/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =head1 NAME
9  
10 Data::ICal::Entry::Journal - Represents a journal entry in an iCalendar file
11  
12 =head1 SYNOPSIS
13  
14 my $vjournal = Data::ICal::Entry::Journal->new();
15 $vjournal->add_properties(
16 summary => "Minutes of my party",
17 description => "I cried because I wanted to.",
18 # Dat*e*::ICal is not a typo here
19 dtstart => Date::ICal->new( epoch => time )->ical,
20 );
21  
22 $calendar->add_entry($vjournal);
23  
24 =head1 DESCRIPTION
25  
26 A L<Data::ICal::Entry::Journal> object represents a single journal
27 entry in an iCalendar file. (Note that the iCalendar RFC refers to
28 entries as "components".) It is a subclass of L<Data::ICal::Entry>
29 and accepts all of its methods.
30  
31 =head1 METHODS
32  
33 =cut
34  
35 =head2 ical_entry_type
36  
37 Returns C<VJOURNAL>, its iCalendar entry name.
38  
39 =cut
40  
41 0 ▶sub ical_entry_type {'VJOURNAL'}
Subroutine ical_entry_type: not called CC=1 SCAR=6.9
Pod documented
42  
43 =head2 mandatory_unique_properties
44  
45 The C<uid> property is mandatory if C<rfc_strict> was passed to
46 L<Data::ICal/new>.
47  
48 =cut
49  
50 0 ▶sub mandatory_unique_properties {
Subroutine mandatory_unique_properties: not called CC=2 SCAR=17.9
Pod documented
51 0 my $self = shift;
52 0 ▶ return $self->rfc_strict ? ("uid") : ()
Branch: 1 branch
BranchTrueFalseTotal
$self->rfc_strict ? : 0 0 0
53 }
54  
55 =head2 optional_unique_properties
56  
57 According to the iCalendar standard, the following properties may be
58 specified at most one time for a journal entry:
59  
60 class created description dtstart dtstamp
61 last-modified organizer recurrence-id sequence status
62 summary uid url
63  
64 =cut
65  
66 0 ▶sub optional_unique_properties {
Subroutine optional_unique_properties: not called CC=2 SCAR=17.9
Pod documented
67 0 my $self = shift;
68 0 my @ret = qw(
69 class created description dtstart dtstamp
70 last-modified organizer recurrence-id sequence status
71 summary url
72 );
73 0 ▶ push @ret, "uid" unless $self->rfc_strict;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->rfc_strict 0 0 0
74 0 return @ret;
75 }
76  
77 =head2 optional_repeatable_properties
78  
79 According to the iCalendar standard, the following properties may be
80 specified any number of times for a journal entry:
81  
82 attach attendee categories comment
83 contact exdate exrule related-to rdate
84 rrule request-status
85  
86 =cut
87  
88 0 ▶sub optional_repeatable_properties {
Subroutine optional_repeatable_properties: not called CC=1 SCAR=6.9
Pod documented
89 0 qw(
90 attach attendee categories comment
91 contact exdate exrule related-to rdate
92 rrule request-status
93 );
94 }
95  
96 =head1 AUTHOR
97  
98 Best Practical Solutions, LLC E<lt>modules@bestpractical.comE<gt>
99  
100 =head1 LICENCE AND COPYRIGHT
101  
102 Copyright (c) 2005 - 2020, Best Practical Solutions, LLC. All rights reserved.
103  
104 This module is free software; you can redistribute it and/or
105 modify it under the same terms as Perl itself. See L<perlartistic>.
106  
107 =cut
108  
109 1 1;
« ICal/Entry/FreeBusy.pm ↑ Summary ICal/Entry/Event.pm »