Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Monks, I am getting following error when i ran the code given below. Where i am going wrong?

use Util::SelfDestruct; print "hi";

Error

The getpwuid function is unimplemented at C:/Perl/site/lib/Util/SelfDe +struct.pm line 33. BEGIN failed--compilation aborted at C:/Perl/site/lib/Util/SelfDestruc +t.pm line 33. Compilation failed in require at D:\test\testing\sum.pl line 1. BEGIN failed--compilation aborted at D:\test\testing\sum.pl line 1.

Replies are listed 'Best First'.
Re: Getting error when i use Self Destruct
by ysth (Canon) on Jan 16, 2006 at 12:18 UTC
    You aren't doing anything wrong; the module just doesn't expect to run on a platform that doesn't implement getpwuid. It can be fixed by changing the -d (getpwuid($>))[7] on line 33 to eval { -d (getpwuid($>))[7] }. Reporting this to the module author would be a good idea.