#!/usr/bin/perl
#use Mooix::Thing;
run sub {
	my $this=shift;
	%_=@_;
	my $obj=$_{direct_object} || $this->usage("direct object required");

	# Make sure that this command is not spoofed, just in case.
        if ($_{avatar} != $this) {
		fail "No!"; 
	}
	
	if (! $obj->destroy) {
		$_{session}->write("Object destroyed.");
	}
	else {
		fail "You can't destroy that.";
	}
}
