Net::ICal::Calendar(3p)

NAME
Net::ICal::Calendar -- Hold and manipulate events, todo items and journal entries.

SYNOPSIS
  use Net::ICal;

  my $cal = new Net::ICal::Calendar(
        alarms    => [ array of alarm objects ],
        events    => [ array of event objects ],
        todos     => [ array of todo objects ],
        journals  => [ array of journal objects ],
        timezones => [ array of timezone objects ],
  );

TO BE IMPLEMENTED LATER
  # Has the calendar been modified since we last checked?
  if( ! ($cal->last_modified() > $our_last_mod_time)){
    return;
  }

  # Only deal with meeting requests from Larry
  foreach $message ($cal->messages() ){
    if($message->method() eq 'REQUEST' &&
       $message->type() eq 'VEVENT' &&
       $message->organizer() eq 'mailto:larray@example.com'){

      my @overlaps = $cal->overlap_search($message);

      if($#overlaps){
        # Reject or counterpropose the request
        my $new_time =
        $cal->next_free_time(Net::ICal::Time(time(0),
                                         $message->span()->duration(),
                                         $message->span()->priority()));
      } else {
        # Add it to the calendar
        $cal->book($message);
      }
    }

    #Now check for any alarms in the next hour
    @alarms= $cal->alarms(new Net::ICal::Period(time(0),"1h"));

  }

DESCRIPTION
A Net::ICal::Calendar represents Calendar that can hold events, todo items, journal entries (and incoming messages?).

METHODS

  new()
Construct a new calendar, given sets of data to put in the calendar. See the example above.

  new_from_ical
Creates a new Net::ICal::Calendar from an ical stream. Use this to read in a new object before you do things with it. (Inherited from Net::ICal::Component; read its documentation if you're curious.)

METHODS FOR INTERNAL USE ONLY
None of the following methods should be relied on by anything outside this module. Use at your own risk.

  _create ($class, %args)
Sets up a Class::MethodMapper map to describe the data in this class, then initialize the object. Takes a classname and a hash of arguments, returns a Net::ICal::Calendar. See the Class::MethodMapper docs if you want to understand what this does slightly better.

SEE ALSO
More documentation pointers can be found in Net::ICal.