Skip to content

Instantly share code, notes, and snippets.

@kamipo
Created March 11, 2010 15:52
Show Gist options
  • Save kamipo/329258 to your computer and use it in GitHub Desktop.
Save kamipo/329258 to your computer and use it in GitHub Desktop.
function cpan-uninstall {
perl -MConfig -MExtUtils::Install -le '
($FULLEXT = shift) =~ s{::}{/}g;
if ($_ = $ENV{PERL_MM_OPT}) {
s/INSTALL_BASE=//;
$_ .= "/lib/perl5/$Config{archname}/auto/$FULLEXT/.packlist";
}
else {
$_ = "$Config{sitearchexp}/auto/$FULLEXT/.packlist";
}
uninstall $_, 1' $1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment