Removing all of the objects of a particular class
To quickly remove all of the objects of a particular class, call the
remove_all
method on the class name in question:
MT::Foo->remove_all();
On success, remove_all
will return some true value; on failure, it will
return undef
, and you can retrieve the error message by calling the
errstr
method on the class name:
MT::Foo->remove_all
or die "Removing all foo objects failed: ", MT::Foo->errstr;