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?

sub 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; }
https://metacpan.org/pod/Set::Infinite#as_string

Replies are listed 'Best First'.
Re^2: Serialzed Date Recurrence
by Boldra (Curate) on Mar 09, 2017 at 16:03 UTC
    You're saying that because "clone" works by serializing/deserializing, I could use that?

      You're saying that because "clone" works by serializing/deserializing, I could use that?

      huh?

      I think I'm saying, its open source, so copy/paste the source and modify as required and fill in the blanks