Uninstalling Perl modules

How do I uninstall modules that were installed using the traditional method:

perl Makefile.PL
make
make test
make install


When I do "make uninstall," I'm told that uninstall is deprecated, and
it doesn't do the uninstallation.


--
paduille.4060.mumia.w [at] earthlink.net
Windows Vista and your
freedom in conflict: http://www.badvista.org/
http://home.earthlink.net/~mumia.w.18.spam/
paduille.4060.mumia.w [ Mi, 10 Januar 2007 05:42 ] [ ID #1591410 ]

Re: Uninstalling Perl modules

On Wed, 10 Jan 2007 15:42:49 +1100, Mumia W. (on aioe) wrote:

Hi

> How do I uninstall modules that were installed using the
> traditional method:
[snip]
> When I do "make uninstall," I'm told that uninstall is deprecated,
> and it doesn't do the uninstallation.

If you look inside a Makefile, you'll see:
-----><8-----
uninstall :: uninstall_from_$(INSTALLDIRS)dirs
=09$(NOECHO) $(NOOP)

uninstall_from_perldirs ::
=09$(NOECHO) $(UNINSTALL) $(PERL_ARCHLIB)\auto\$(FULLEXT)\.packlist

uninstall_from_sitedirs ::
=09$(NOECHO) $(UNINSTALL) $(SITEARCHEXP)\auto\$(FULLEXT)\.packlist

uninstall_from_vendordirs ::
=09$(NOECHO) $(UNINSTALL) $(VENDORARCHEXP)\auto\$(FULLEXT)\.packlist
-----><8-----
So, that's why "make uninstall" did nothing. Try the others...
Ron Savage [ Mi, 10 Januar 2007 07:16 ] [ ID #1591411 ]

Re: Uninstalling Perl modules

On 01/10/2007 12:16 AM, Ron Savage wrote:
> On Wed, 10 Jan 2007 15:42:49 +1100, Mumia W. (on aioe) wrote:
>
> Hi
>
>> How do I uninstall modules that were installed using the
>> traditional method:
> [snip]
>> When I do "make uninstall," I'm told that uninstall is deprecated,
>> and it doesn't do the uninstallation.
>
> If you look inside a Makefile, you'll see:
> -----><8-----
> uninstall :: uninstall_from_$(INSTALLDIRS)dirs
> $(NOECHO) $(NOOP)
>
> uninstall_from_perldirs ::
> $(NOECHO) $(UNINSTALL) $(PERL_ARCHLIB)\auto\$(FULLEXT)\.packlist
>
> uninstall_from_sitedirs ::
> $(NOECHO) $(UNINSTALL) $(SITEARCHEXP)\auto\$(FULLEXT)\.packlist
>
> uninstall_from_vendordirs ::
> $(NOECHO) $(UNINSTALL) $(VENDORARCHEXP)\auto\$(FULLEXT)\.packlist
> -----><8-----
> So, that's why "make uninstall" did nothing. Try the others...
>
>
>

All of these commands fail to uninstall:

make uninstall_from_perldirs
make uninstall_from_sitedirs
make uninstall_from_vendordirs



--
paduille.4060.mumia.w [at] earthlink.net
Windows Vista and your
freedom in conflict: http://www.badvista.org/
http://home.earthlink.net/~mumia.w.18.spam/
paduille.4060.mumia.w [ Mi, 10 Januar 2007 08:09 ] [ ID #1591412 ]

Re: Uninstalling Perl modules

On Wed, 10 Jan 2007 18:09:01 +1100, Mumia W. (on aioe) wrote:

Hi

> All of these commands fail to uninstall:
> make uninstall_from_perldirs
> make uninstall_from_sitedirs
> make uninstall_from_vendordirs

Hmmm. OK. Let's try something else.

From a CGI script I use to install modules, I see:

use Config;
....
$Config{'make'} install UNINST=3D1

and for you $Config{'make'} is just make, so try

make install UNINST=3D1
Ron Savage [ Do, 11 Januar 2007 00:08 ] [ ID #1591416 ]

Re: Uninstalling Perl modules

On 01/10/2007 05:08 PM, Ron Savage wrote:
> On Wed, 10 Jan 2007 18:09:01 +1100, Mumia W. (on aioe) wrote:
>
> Hi
>
>> All of these commands fail to uninstall:
>> make uninstall_from_perldirs
>> make uninstall_from_sitedirs
>> make uninstall_from_vendordirs
>
> Hmmm. OK. Let's try something else.
>
> From a CGI script I use to install modules, I see:
>
> use Config;
> ....
> $Config{'make'} install UNINST=1
>
> and for you $Config{'make'} is just make, so try
>
> make install UNINST=1
>
>

Nope, it just performs another installation :-(
paduille.4060.mumia.w [ Do, 11 Januar 2007 02:21 ] [ ID #1592713 ]

Re: Uninstalling Perl modules

On Thu, 11 Jan 2007 12:21:32 +1100, Mumia W. (on aioe) wrote:

Hi

>> make install UNINST=3D1
> Nope, it just performs another installation :-(

You're right. I was in a daze. It uninstalls the previous version.
Ron Savage [ Do, 11 Januar 2007 11:24 ] [ ID #1592714 ]

Re: Uninstalling Perl modules

"Mumia W. (on aioe)" <paduille.4060.mumia.w [at] earthlink.net> writes:

> How do I uninstall modules that were installed using the traditional method:

I use a script called modrm from ExtUtils::Packlist.

--
Radek
rahed [ Do, 11 Januar 2007 16:40 ] [ ID #1592715 ]

Re: Uninstalling Perl modules

On 01/11/2007 09:40 AM, rahed wrote:
> "Mumia W. (on aioe)" <paduille.4060.mumia.w [at] earthlink.net> writes:
>
>> How do I uninstall modules that were installed using the traditional method:
>
> I use a script called modrm from ExtUtils::Packlist.
>

Thanks. I'll look into this.
paduille.4060.mumia.w [ Do, 11 Januar 2007 22:39 ] [ ID #1592716 ]

Re: Uninstalling Perl modules

On Fri, 12 Jan 2007 02:40:55 +1100, rahed wrote:

Hi

> I use a script called modrm from ExtUtils::Packlist.

$many x $thanx;

Patching it to read a list of module names from [at] ARGV rather than having to=
hit
return for every module you want to keep is left as an exercise for the=
reader.
Ron Savage [ Fr, 12 Januar 2007 00:41 ] [ ID #1592717 ]

Re: Uninstalling Perl modules

Ron Savage <ron [at] savage.net.au> writes:

> Patching it to read a list of module names from [at] ARGV rather than
> having to hit return for every module you want to keep is left as an
> exercise for the reader.

Whenever I rarely use the utitily I want to fix it but haven't found
time.

--
Radek
rahed [ Fr, 12 Januar 2007 10:36 ] [ ID #1593864 ]

Re: Uninstalling Perl modules

On Fri, 12 Jan 2007 20:36:47 +1100, rahed wrote:

Hi

> Whenever I rarely use the utitily I want to fix it but haven't
> found time.

I found it (Note: tabs =3D 4 spaces):

-----><8-----
#!/usr/bin/perl

use strict;
use warnings;

use IO::Dir;
use ExtUtils::Packlist;
use ExtUtils::Installed;

# -----------------------------------------------

sub emptydir($)
{
=09my($dir)=09=3D [at] _;
=09my($dh)=09=09=3D IO::Dir->new($dir) || return(0);
=09my( [at] count)=09=3D $dh->read();

=09$dh->close();

=09return ( [at] count =3D=3D 2 ? 1 : 0);
}

# -----------------------------------------------

die "Usage: $0 A::B ...\n" if (! [at] ARGV);

print("Finding all installed modules...\n");

my($installed) =3D ExtUtils::Installed->new();

for my $module (grep(!/^Perl$/, $installed -> modules() ) )
{
=09last if (! [at] ARGV);

=09my $version =3D $installed -> version($module) || '?';

=09if ($ARGV[0] eq $module)
=09{
=09=09print "Deleting $module. \n";

=09=09shift [at] ARGV;

=09=09# Remove all the files

=09=09for my $file (sort $installed -> files($module) )
=09=09{
=09=09=09print("rm $file\n");

=09=09=09unlink($file);
=09=09}

=09=09my($pf) =3D $installed -> packlist($module) -> packlist_file();

=09=09print("rm $pf\n");

=09=09unlink($pf);

=09=09for my $dir (sort $installed -> directory_tree($module) )
=09=09{
=09=09=09if (emptydir($dir) )
=09=09=09{
=09=09=09=09print("rmdir $dir\n");

=09=09=09=09rmdir($dir);
=09=09=09}
=09=09}
=09}
}
-----><8-----
Ron Savage [ Sa, 13 Januar 2007 00:21 ] [ ID #1593865 ]
Perl » comp.lang.perl.modules » Uninstalling Perl modules

Vorheriges Thema: XML::Twig produces double encoded UTF-8
Nächstes Thema: WWW::Mechanize single quotes around url