Gossamer Forum
Home : General : Perl Programming :

Net::SMTP

Quote Reply
Net::SMTP
Can anyone tell me why I get this error using Net::SMTP:

The getpwuid function is unimplemented at e:/Perl/site/lib/Net/Config.pm line 43.

Thanks.

....well I guess I should ask if anyone can solve it. I have had it working in the past but can't remember how. WinXP/Apache.

Btw...I posted this question about an hour ago and the thread totally disappeared.


Last edited by:

RedRum: Jan 1, 2002, 4:01 PM
Quote Reply
Re: [RedRum] Net::SMTP In reply to
You say you've had this working before? I very much doubt that you've had this working before on the exact same platform.

The function you are trying to access is not available on Win32 platforms.

Check the Perl Documentation (http://www.perldoc.com/....1/pod/perlport.html) it will tell you that:

Code:
getpwuid UID

Not implemented. (Mac OS, Win32)
Not useful. ( RISC OS)

Another reason why *ix platforms are better than it's Win32 equivalent. ;-)

- wil

Last edited by:

Wil: Jan 2, 2002, 1:43 AM
Quote Reply
Re: [Wil] Net::SMTP In reply to
Quote:
Another reason why *ix platforms are better than it's Win32 equivalent. ;-)
Huh? If it's equivalent, than it can't be better :-)

--Philip
Links 2.0 moderator
Quote Reply
Re: [ThatPerson1024] Net::SMTP In reply to
Equivalent competiton? :-)

- wil
Quote Reply
Re: [Wil] Net::SMTP In reply to
You misunderstood.

I realise getpwuid isn't implemented on Windows Tongue

I meant I had Net::SMTP working.

Last edited by:

RedRum: Jan 2, 2002, 3:53 AM
Quote Reply
Re: [RedRum] Net::SMTP In reply to
So if you realised this, why did you post your question in the first place?!

- wil
Quote Reply
Re: [Wil] Net::SMTP In reply to
Net::SMTP _had_ been working then I started getting this error, hence I'm looking for ways to bypass it or looking for an explanation as to why it occured.

I guess I'll just have to wait for Alex or someone to stop by who can tell me the answer.

Last edited by:

RedRum: Jan 2, 2002, 4:01 AM
Quote Reply
Re: [RedRum] Net::SMTP In reply to
But I've just given you the reason.

Code:
$ perldoc -f perlport

...

getpwuid UID

Not implemented. (Mac OS, Win32)

Not useful. (RISC OS)

- wil

Last edited by:

Wil: Jan 2, 2002, 4:05 AM
Quote Reply
Re: [Wil] Net::SMTP In reply to
You're missing the point. Don't worry about it Wil.
Quote Reply
Re: [RedRum] Net::SMTP In reply to
You asked, and I quote:

Code:
"Can anyone tell me why I get this error using Net::SMTP:

The getpwuid function is unimplemented at e:/Perl/site/lib/Net/Config.pm line 43.
"

And I've just given you the exact reason. What point am I not getting?

- wil

Last edited by:

Wil: Jan 2, 2002, 4:08 AM
Quote Reply
Re: [Wil] Net::SMTP In reply to
>>What point am I not getting?<<

The fact that the same module, Net::SMTP was working on WinXP without that error a couple of days ago :^)

Therefore even if, as we both know, getpwuid isn't implemented on Windows, there must be a reason why it worked previously and why it stopped working.

Net::SMTP was downloaded using ppm so it _IS_ Windows compatible.
Quote Reply
Re: [RedRum] Net::SMTP In reply to
Yes. I've never said that Net::SMTP would not work on Windows or any other paltform for that matter. What I'm saying is that the paticular function getpwuid will not work on a Win32 platform.

You may use other functions of the module without any problem, you just won't be able to use that paticular one.

- wil
Quote Reply
Re: [Wil] Net::SMTP In reply to
You are still not getting it.

I think I've said a couple of time that I KNOW getpwuid isn't available on Windows.

Net::SMTP is what is generating the error, _I'm_ not using getpwuid anywhere, it is buried in Net::Config

Just don't worry about it Wil, I'd really prefer to wait for someone else to stop by. We are going in circles.


Last edited by:

RedRum: Jan 2, 2002, 4:17 AM
Quote Reply
Re: [RedRum] Net::SMTP In reply to
Ok now this is weird.

A script that I've been working on in another directory has now just screwed up too. (Was working yesterday).

[Wed Jan 02 12:34:40 2002] [error] [client 213.106.15.150] Premature end of script headers: e:/apache/htdocs/gallery/img.cgi
[Wed Jan 02 12:34:40 2002] [error] [client 213.106.15.150] The getpwuid function is unimplemented at e:/Perl/site/lib/Net/Config.pm line 43.

[Wed Jan 02 12:34:40 2002] [error] [client 213.106.15.150] Compilation failed in require at e:/Perl/site/lib/Net/SMTP.pm line 17.

[Wed Jan 02 12:34:40 2002] [error] [client 213.106.15.150] BEGIN failed--compilation aborted at e:/Perl/site/lib/Net/SMTP.pm line 17.

[Wed Jan 02 12:34:40 2002] [error] [client 213.106.15.150] Compilation failed in require at admin/Library/Mailer.pm line 11.

[Wed Jan 02 12:34:40 2002] [error] [client 213.106.15.150] BEGIN failed--compilation aborted at admin/Library/Mailer.pm line 11.

[Wed Jan 02 12:34:40 2002] [error] [client 213.106.15.150] Compilation failed in require at admin/Gallery.pm line 15.

[Wed Jan 02 12:34:40 2002] [error] [client 213.106.15.150] BEGIN failed--compilation aborted at admin/Gallery.pm line 15.

[Wed Jan 02 12:34:40 2002] [error] [client 213.106.15.150] Compilation failed in require at e:\apache\htdocs\gallery\img.cgi line 13.

[Wed Jan 02 12:34:40 2002] [error] [client 213.106.15.150] BEGIN failed--compilation aborted at e:\apache\htdocs\gallery\img.cgi line 13.


Think Im gonna re-install Net::SMTP
Quote Reply
Re: [RedRum] Net::SMTP In reply to
Hmm Im also wondering how Net::SMTP got in my site/lib directory as it doesn't seem to be a ppm

1142 Net-SCP W L S 0.03
1143 Net-Server W L S 0.79
1144 Net-SMPP W L S 0.91
1145 Net-SNMP W L S 3.60
1146 Net-SNMP-alpha W L S 3.9.6
1147 Net-SNMP-Interfaces W L S 0.2
1148 Net-SNPP W L S 1.12
1149 Net-Spooler W L S 0.02
1150 Net-SSH

Quote Reply
Re: [RedRum] Net::SMTP In reply to
Ok I need to install libnet using ppm to get Net::SMTP.
Quote Reply
Re: [RedRum] Net::SMTP In reply to
Ok I downloaded the newest verison of perl and installed it:

Error: The getpwuid function is unimplemented at e:/Perl/site/lib/Net/Config.pm line 43.
Package: Net::Config
File: e:/Perl/site/lib/Net/Config.pm
Line: 43

Quote Reply
Re: [RedRum] Net::SMTP In reply to
Would you believe it?


Changing:

eval { require Net::SMTP; }; $@ and die $@;

to:

use Net::SMTP;

...got rid of the damn error.

Quote Reply
Re: [RedRum] Net::SMTP In reply to
Is it because use only uses the required functions while eval checks the whole module and therefore if it couldn't complete one function (which it couldn't) it would fail?

- wil
Quote Reply
Re: [Wil] Net::SMTP In reply to
That was part of the problem but :

require Net::SMTP;

...gave the same error so either there is some difference between use and require or require eval's whereas use doesn't.

Ack.
Quote Reply
Re: [RedRum] Net::SMTP In reply to
Yes, but Net::SMTP is not properly loaded now.

Try using ppm to install a new one.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Net::SMTP In reply to
I reinstalled perl and got the same error. It seems to be working now. Why won't it be loaded properly?



Last edited by:

RedRum: Jan 3, 2002, 11:19 AM