We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Meerkat::Role::Document::_collection attribute non-private so that objects can be "clone aware". For example:
Meerkat::Role::Document::_collection
package My::Template; use Moose; with 'Meerkat::Role::Document; has latest => (...boolean..); has version => (...number..); has content => (...string...); sub as_hash { ... } sub update_content { my ($self, $content) = @_; my $clone = $self->as_hash; $self->update_set( content => $content ); $self->update_inc( version => 1 ); $self->sync; $clone->{latest} => 0; $self->collection->create( %{ $clone } ); # as $self->_collection return $self; } package main; say $meerkat->collection('Template') ->find_one({latest => 1}) ->update_content('I like fluffy bunnies') ->version;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Make
Meerkat::Role::Document::_collection
attribute non-private so that objects can be "clone aware".For example:
The text was updated successfully, but these errors were encountered: