#!/usr/bin/perl
#use Mooix::Thing;
run sub {
	my $this=shift;
	
	# Come up with the most appropriate message for whatever they tried
	# to do.
	my @ret;
	my ($field, $object);
	
	my $addret = sub {
		return unless defined $field;
		if (defined $object && $object == $this) {
			push @ret, (0, "Sorry, you cannot personalize yourself.");
		}
		else {
			push @ret, (0, "Sorry, you cannot modify objects in the moo.");
		}
	};
	
	while (@_) {
		my $key=shift;
		my $value=shift;
		if ($key eq 'object') {
			$object = $value;
			$addret->();
			$field = undef;
		}
		elsif ($key eq 'field') {
			$field=$value;
		}
	}
	$addret->();

	if (! @ret) { # paranoia
		push @ret, (0, "You can't do that.");
	}
	
	return @ret;
}
