ICal/Entry/Alarm/Procedure.pm

filter: Statementstmt 62.5% 10 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod 100% 3 / 3 totaltotal 64.0% 16 / 25 CC 1 SCAR 4.1
CC
1
Cov
62%
new
2.0
optional_unique_properties
2.0
mandatory_unique_properties
2.0
CRAP 1.5
« ICal/Entry/Alarm/Email.pm ↑ Summary ICal/Entry/Alarm/Display.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::Alarm::Procedure;
5  
6 1 ▶use base qw/Data::ICal::Entry::Alarm/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =head1 NAME
9  
10 Data::ICal::Entry::Alarm::Procedure - Represents a procedure-call alarm in an iCalendar file
11  
12 =head1 SYNOPSIS
13  
14 my $valarm = Data::ICal::Entry::Alarm::Procedure->new();
15 $valarm->add_properties(
16 attach => [ "ftp://host.com/novo-procs/felizano.exe", { fmttype => "application/binary" } ],
17 # Dat*e*::ICal is not a typo here
18 trigger => [ Date::ICal->new( epoch => ... )->ical, { value => 'DATE-TIME' } ],
19 );
20  
21 $vevent->add_entry($valarm);
22  
23 =head1 DESCRIPTION
24  
25 A L<Data::ICal::Entry::Alarm::Procedure> object represents an alarm
26 that calls a procedure (in some application-defined way), which is
27 attached to a todo item or event in an iCalendar file. (Note that the
28 iCalendar RFC refers to entries as "components".) It is a subclass of
29 L<Data::ICal::Entry::Alarm> and accepts all of its methods.
30  
31 =head1 METHODS
32  
33 =cut
34  
35 =head2 new
36  
37 Creates a new L<Data::ICal::Entry::Alarm::Procedure> object; sets its
38 C<ACTION> property to C<PROCEDURE>.
39  
40 =cut
41  
42 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
43 0 my $class = shift;
44 0 my $self = $class->SUPER::new(@_);
45 0 $self->add_property( action => "PROCEDURE" );
46 0 return $self;
47 }
48  
49 =head2 optional_unique_properties
50  
51 In addition to C<duration> and C<repeat> (see
52 L<Data::ICal::Entry::Alarm/optional_unique_properties>), procedure-call
53 alarms may also specify a value for C<description>.
54  
55 =cut
56  
57 0 ▶sub optional_unique_properties {
Subroutine optional_unique_properties: not called CC=1 SCAR=6.9
Pod documented
58 return (
59 shift->SUPER::optional_unique_properties,
60 0 "description",
61 );
62 }
63  
64 =head2 mandatory_unique_properties
65  
66 In addition to C<action> and C<trigger> (see
67 L<Data::ICal::Entry::Alarm/mandatory_unique_properties>), procedure-call
68 alarms must also specify a value for C<attach>.
69  
70 =cut
71  
72 0 ▶sub mandatory_unique_properties {
Subroutine mandatory_unique_properties: not called CC=1 SCAR=6.9
Pod documented
73 return (
74 shift->SUPER::mandatory_unique_properties,
75 0 "attach",
76 );
77 }
78  
79 =head1 AUTHOR
80  
81 Best Practical Solutions, LLC E<lt>modules@bestpractical.comE<gt>
82  
83 =head1 LICENCE AND COPYRIGHT
84  
85 Copyright (c) 2005 - 2020, Best Practical Solutions, LLC. All rights reserved.
86  
87 This module is free software; you can redistribute it and/or
88 modify it under the same terms as Perl itself. See L<perlartistic>.
89  
90 =cut
91  
92 1 1;
« ICal/Entry/Alarm/Email.pm ↑ Summary ICal/Entry/Alarm/Display.pm »