Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 18 lines (13 sloc) 357 Bytes
#!/usr/bin/perl -w
use strict;
use lib 'lib';
use MT;
my $mt = MT->new or die MT->errstr;
my($class, $id) = @ARGV;
die "usage: $0 <object-class> <object-id>"
unless $class && $id;
eval "use $class;";
die "Error loading '$class': $@" if $@;
my $obj = $class->load($id) or
die "Load of object with ID $id failed: " . $class->errstr;
$obj->remove;