in reply to Serialzed Date Recurrence
There's also DateTime::Event::Recurrence, but that seems to have no serialization/inflation. Maybe I could dump the object as perl and store that in the database, but yuck.
huh?
https://metacpan.org/pod/Set::Infinite#as_stringsub clone { my $self = shift; my $new = $self->SUPER::clone( @_ ); $new->set_ical( $self->get_ical ); $new; } sub clone { my $self = bless { %{ $_[0] } }, ref $_[0]; $self->{set} = $_[0]->{set}->copy; return $self; } sub copy { my $self = shift; my $copy = $self->empty_set(); ## return $copy unless ref($self); # constructor! foreach my $key (keys %{$self}) { if ( ref( $self->{$key} ) eq 'ARRAY' ) { @{ $copy->{$key} } = @{ $self->{$key} }; } else { $copy->{$key} = $self->{$key}; } } return $copy; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Serialzed Date Recurrence
by Boldra (Curate) on Mar 09, 2017 at 16:03 UTC | |
by Anonymous Monk on Mar 09, 2017 at 23:48 UTC |