CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
CGI::remote_user ?

 



rad7
Novice

Nov 2, 2004, 10:11 PM

Post #1 of 3 (491 views)
CGI::remote_user ? Can't Post

hello ,

I need a clarification here.

My code goes thus.

*******************************

package UPI;

use CGI;
require "strings.pl";

sub getUpi(){
if ($ActiveUser){return $ActiveUser;}
$ActiveUser = remote_user();

...

******************************************

It was working fine. But now I get a error like

" Unknown subroutine UPI::remote_uesr()... "

So i adapted the code as

$ActiveUser = CGI::remote_user();

and then it is working fine.

What is the reason for this? Why should the subroutine be called explicitly now?

your suggestions will be of more help.

Thanxs

J


KevinR
Veteran


Nov 2, 2004, 11:30 PM

Post #2 of 3 (490 views)
Re: [rad7] CGI::remote_user ? [In reply to] Can't Post

did your webhost upgrade to a newer version of Perl (or maybe just the CGI module) recently?
-------------------------------------------------


davorg
Thaumaturge / Moderator

Nov 4, 2004, 2:33 AM

Post #3 of 3 (485 views)
Re: [rad7] CGI::remote_user ? [In reply to] Can't Post

The CGI module doesn't export any functions by default. You need to tell it which functions you are going to use.


Code
use CGI 'remote_user';


Or, if you are going to use a number of functions you can use one of


Code
use CGI ':standard'; 
use CGI ':all';
use CGI ':cgi';


--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives