Fetching contributors…
Cannot retrieve contributors at this time
executable file 59 lines (33 sloc) 967 Bytes
=head1 NAME
mogdelete -- Delete keys from a MogileFS installation
$ mogdelete --trackers=host --domain=foo --key="/hello.jpg"
=head1 OPTIONS
=item --trackers=host1:7001,host2:7001
Use these MogileFS trackers to negotiate with.
=item --domain=<domain>
Set the MogileFS domain to use.
=item --key="<key>"
A key to delete. Can be an arbitrary string.
=head1 AUTHOR
Dormando E<lt>L<>E<gt>
=head1 BUGS
Produces a slightly weird error if key does not exist.
=head1 LICENSE
Licensed for use and redistribution under the same terms as Perl itself.
use strict;
use warnings;
use lib './lib';
use MogileFS::Utils;
my $util = MogileFS::Utils->new;
my $usage = "--trackers=host --domain=foo --key='/hello.jpg'";
my $c = $util->getopts($usage, 'key=s');
my $mogc = $util->client;
if ($mogc->errcode) {
die "Error deleting file: ", $mogc->errstr, "\n";