MQUL

 view release on metacpan or  search on metacpan

lib/MQUL.pm  view on Meta::CPAN

after the update. If the update hash-ref doesn't have any of the update
modifiers described by the language, then the update hash-ref is considered
as what the document should now be, and so will simply replace the document
hash-ref (once again, in accordance with MongoDB).

See L<MQUL::Reference/"UPDATE STRUCTURE"> to learn about the structure of
update hash-refs.

=cut

sub update_doc {
	my ($doc, $obj) = @_;

	croak "MQUL::update_doc() requires a document hash-ref."
		unless defined $doc && ref $doc && ref $doc eq 'HASH';
	croak "MQUL::update_doc() requires an update hash-ref."
		unless defined $obj && ref $obj && ref $obj eq 'HASH';

	# we only need to do something if the $obj hash-ref has any advanced
	# update operations, otherwise $obj is meant to be the new $doc

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.522 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )